From patchwork Fri Oct 26 06:38:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10656977 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 1C55C109C for ; Fri, 26 Oct 2018 06:28:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF8D52BDE3 for ; Fri, 26 Oct 2018 06:28:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF1A12BF35; Fri, 26 Oct 2018 06:28:30 +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 5D27B2BDE3 for ; Fri, 26 Oct 2018 06:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726243AbeJZPEG (ORCPT ); Fri, 26 Oct 2018 11:04:06 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:47211 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725893AbeJZPEG (ORCPT ); Fri, 26 Oct 2018 11:04:06 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 9C56EE4EA4200; Fri, 26 Oct 2018 14:28:20 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.408.0; Fri, 26 Oct 2018 14:28:14 +0800 From: YueHaibing To: "James E.J. Bottomley" , "Martin K. Petersen" , Kees Cook , John Garry , Jack Wang , "Johannes Thumshirn" CC: YueHaibing , , , Subject: [PATCH -next] mvsas: remove set but not used variables 'res_flag' Date: Fri, 26 Oct 2018 06:38:36 +0000 Message-ID: <1540535916-45509-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected 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 Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/mvsas/mv_init.c: In function 'mvs_ioremap': drivers/scsi/mvsas/mv_init.c:315:36: warning: variable 'res_flag' set but not used [-Wunused-but-set-variable] unsigned long res_start, res_len, res_flag, res_flag_ex = 0; It not used anymore after commit 92b19ff50e8f ("cleanup IORESOURCE_CACHEABLE vs ioremap()") Signed-off-by: YueHaibing --- drivers/scsi/mvsas/mv_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index 3ac3437..d7534fb 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c @@ -312,7 +312,7 @@ static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost) int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex) { - unsigned long res_start, res_len, res_flag, res_flag_ex = 0; + unsigned long res_start, res_len, res_flag_ex = 0; struct pci_dev *pdev = mvi->pdev; if (bar_ex != -1) { /* @@ -340,7 +340,6 @@ int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex) goto err_out; } - res_flag = pci_resource_flags(pdev, bar); mvi->regs = ioremap(res_start, res_len); if (!mvi->regs) {