summaryrefslogtreecommitdiff
path: root/drivers/scsi/smartpqi/smartpqi_init.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-08-31 16:03:48 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2019-10-01 05:37:18 +0300
commit1c6294858950a3cc609570f050734e1492e6a155 (patch)
tree98e9580eba6b1b4dd6de5c09b56d03424720cf9b /drivers/scsi/smartpqi/smartpqi_init.c
parenta3a65ddd79c3c975eb1295863289aa4bbaded283 (diff)
downloadlinux-1c6294858950a3cc609570f050734e1492e6a155.tar.xz
scsi: smartpqi: remove set but not used variable 'ctrl_info'
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") added it but it was never used. Also remove variable 'shost'. [mkp: commit desc] Link: https://lore.kernel.org/r/20190831130348.20552-1-yuehaibing@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/smartpqi/smartpqi_init.c')
-rw-r--r--drivers/scsi/smartpqi/smartpqi_init.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 652d48224942..4f649ad9e5bd 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -6157,12 +6157,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);
}