From: YueHaibing <yuehaibing@huawei.com>
To: Don Brace <don.brace@microsemi.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Murthy Bhat <Murthy.Bhat@microsemi.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: YueHaibing <yuehaibing@huawei.com>,
<esc.storagedev@microsemi.com>, <linux-scsi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
Hulk Robot <hulkci@huawei.com>
Subject: [PATCH -next] scsi: smartpqi: remove set but not used variable 'ctrl_info'
Date: Sat, 31 Aug 2019 13:03:48 +0000 [thread overview]
Message-ID: <20190831130348.20552-1-yuehaibing@huawei.com> (raw)
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/smartpqi/smartpqi_init.c: In function 'pqi_driver_version_show':
drivers/scsi/smartpqi/smartpqi_init.c:6164:24: warning:
variable 'ctrl_info' set but not used [-Wunused-but-set-variable]
commit 6d90615f1346 ("scsi: smartpqi: add sysfs entries") add it but never
use, so remove it also variable 'shost'
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/scsi/smartpqi/smartpqi_init.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index ea5409bebf57..b9e7dabee1e5 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -6160,12 +6160,6 @@ static ssize_t pqi_firmware_version_show(struct device *dev,
static ssize_t pqi_driver_version_show(struct device *dev,
struct device_attribute *attr, char *buffer)
{
- struct Scsi_Host *shost;
- struct pqi_ctrl_info *ctrl_info;
-
- shost = class_to_shost(dev);
- ctrl_info = shost_to_hba(shost);
-
return snprintf(buffer, PAGE_SIZE,
"%s\n", DRIVER_VERSION BUILD_TIMESTAMP);
}
next reply other threads:[~2019-08-31 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-31 13:03 YueHaibing [this message]
2019-10-01 2:38 ` Martin K. Petersen
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=20190831130348.20552-1-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=Murthy.Bhat@microsemi.com \
--cc=don.brace@microsemi.com \
--cc=esc.storagedev@microsemi.com \
--cc=hulkci@huawei.com \
--cc=jejb@linux.ibm.com \
--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
all inboxes | Powered by JetHome®