linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Kees Cook <keescook@chromium.org>,
	John Garry <john.garry@huawei.com>,
	Jack Wang <jinpu.wang@profitbricks.com>,
	"Johannes Thumshirn" <jthumshirn@suse.de>
Cc: YueHaibing <yuehaibing@huawei.com>, <linux-scsi@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: [PATCH -next] mvsas: remove set but not used variables 'res_flag'
Date: Fri, 26 Oct 2018 06:38:36 +0000	[thread overview]
Message-ID: <1540535916-45509-1-git-send-email-yuehaibing@huawei.com> (raw)

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 <yuehaibing@huawei.com>
---
 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) {


                 reply	other threads:[~2018-10-26  6:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1540535916-45509-1-git-send-email-yuehaibing@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jinpu.wang@profitbricks.com \
    --cc=john.garry@huawei.com \
    --cc=jthumshirn@suse.de \
    --cc=keescook@chromium.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).