From patchwork Fri Nov 29 13:35:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Erik_Nilsen?= X-Patchwork-Id: 3258511 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ADDAD9F1F4 for ; Fri, 29 Nov 2013 13:58:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1D716205B3 for ; Fri, 29 Nov 2013 13:58:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7CB6120674 for ; Fri, 29 Nov 2013 13:58:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755397Ab3K2N6K (ORCPT ); Fri, 29 Nov 2013 08:58:10 -0500 Received: from smtp.domeneshop.no ([194.63.252.54]:55404 "EHLO smtp.domeneshop.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755108Ab3K2N6K (ORCPT ); Fri, 29 Nov 2013 08:58:10 -0500 Received: from [95.130.216.34] (port=52646 helo=bnilsen-HP.data-respons.com) by smtp.domeneshop.no with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1VmOFK-0005D9-Ra; Fri, 29 Nov 2013 14:36:38 +0100 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= To: jg1.han@samsung.com Cc: marex@denx.de, pratyush.anand@gmail.com, bhelgaas@google.com, linux-pci@vger.kernel.org, kishon@ti.com, Mohit.KUMAR@st.com, ajay.khandelwal@st.com, tharvey@gateworks.com, Eric.Nelson@boundarydevices.com, troy.kisky@boundarydevices.com, =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Subject: [PATCH v5 2/2] PCI: designware: Remove redundant call to pci_write_config Date: Fri, 29 Nov 2013 14:35:25 +0100 Message-Id: <1385732125-28630-3-git-send-email-ben@datarespons.no> X-Mailer: git-send-email 1.8.4.4 In-Reply-To: <1385732125-28630-1-git-send-email-ben@datarespons.no> References: <003101ceecd5$dd4e79e0$97eb6da0$%han@samsung.com> <1385732125-28630-1-git-send-email-ben@datarespons.no> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP write_msi_msg() does exactly the same so there is no need to explicitly call pci_write_config and do the same twice. Signed-off-by: Bjørn Erik Nilsen --- drivers/pci/host/pcie-designware.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 61345a1..212b8b6 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -345,10 +345,10 @@ static int dw_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev, if (irq < 0) return irq; - msg_ctr &= ~PCI_MSI_FLAGS_QSIZE; - msg_ctr |= msgvec << 4; - pci_write_config_word(pdev, desc->msi_attrib.pos + PCI_MSI_FLAGS, - msg_ctr); + /* + * write_msi_msg() will update PCI_MSI_FLAGS so there is + * no need to explicitly call pci_write_config. + */ desc->msi_attrib.multiple = msgvec; msg.address_lo = virt_to_phys((void *)pp->msi_data);