From patchwork Fri Mar 29 23:44:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 10877911 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 963141805 for ; Fri, 29 Mar 2019 23:44:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F75C291B4 for ; Fri, 29 Mar 2019 23:44:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73C50291BE; Fri, 29 Mar 2019 23:44:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B55E291B4 for ; Fri, 29 Mar 2019 23:44:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730176AbfC2Xod (ORCPT ); Fri, 29 Mar 2019 19:44:33 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:43670 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730022AbfC2Xoc (ORCPT ); Fri, 29 Mar 2019 19:44:32 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1hA1Ae-0007tw-4H; Fri, 29 Mar 2019 23:44:24 +0000 From: Colin King To: Jack Wang , lindar_liu@usish.com, "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] scsi: pm8001: clean up structurally dead code when PM8001_USE_MSIX is defined Date: Fri, 29 Mar 2019 23:44:22 +0000 Message-Id: <20190329234423.5611-2-colin.king@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190329234423.5611-1-colin.king@canonical.com> References: <20190329234423.5611-1-colin.king@canonical.com> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King When macro PM8001_USE_MSIX is defined there is redundant dead code call to pm8001_cr32. Clean this up for the defined PM8001_USE_MSIX and undefined PM8001_USE_MSIX cases. Signed-off-by: Colin Ian King Acked-by: Jack Wang --- drivers/scsi/pm8001/pm8001_hwi.c | 7 ++++--- drivers/scsi/pm8001/pm80xx_hwi.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index e4209091c1da..434498a78946 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c @@ -4625,15 +4625,16 @@ static int pm8001_chip_phy_ctl_req(struct pm8001_hba_info *pm8001_ha, static u32 pm8001_chip_is_our_interupt(struct pm8001_hba_info *pm8001_ha) { - u32 value; #ifdef PM8001_USE_MSIX return 1; -#endif +#else + u32 value; + value = pm8001_cr32(pm8001_ha, 0, MSGU_ODR); if (value) return 1; return 0; - +#endif } /** diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c index 536d2b4384f8..4a176e60307f 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.c +++ b/drivers/scsi/pm8001/pm80xx_hwi.c @@ -4619,15 +4619,16 @@ static int pm80xx_chip_phy_ctl_req(struct pm8001_hba_info *pm8001_ha, static u32 pm80xx_chip_is_our_interupt(struct pm8001_hba_info *pm8001_ha) { - u32 value; #ifdef PM8001_USE_MSIX return 1; -#endif +#else + u32 value; + value = pm8001_cr32(pm8001_ha, 0, MSGU_ODR); if (value) return 1; return 0; - +#endif } /**