Commit 3cb0cfb5 authored by Lee Jones's avatar Lee Jones Committed by Martin K. Petersen

scsi: myrs: Remove a couple of unused 'status' variables

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/myrs.c: In function ‘consistency_check_show’:
 drivers/scsi/myrs.c:1193:16: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/myrs.c: In function ‘myrs_get_resync’:
 drivers/scsi/myrs.c:1984:5: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20210312094738.2207817-28-lee.jones@linaro.org
Cc: Hannes Reinecke <hare@kernel.org>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Linux GmbH <hare@suse.com>
Cc: "Leonard N. Zubkoff" <lnz@dandelion.com>
Cc: linux-scsi@vger.kernel.org
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 6b71f60c
...@@ -1190,7 +1190,6 @@ static ssize_t consistency_check_show(struct device *dev, ...@@ -1190,7 +1190,6 @@ static ssize_t consistency_check_show(struct device *dev,
struct myrs_hba *cs = shost_priv(sdev->host); struct myrs_hba *cs = shost_priv(sdev->host);
struct myrs_ldev_info *ldev_info; struct myrs_ldev_info *ldev_info;
unsigned short ldev_num; unsigned short ldev_num;
unsigned char status;
if (sdev->channel < cs->ctlr_info->physchan_present) if (sdev->channel < cs->ctlr_info->physchan_present)
return snprintf(buf, 32, "physical device - not checking\n"); return snprintf(buf, 32, "physical device - not checking\n");
...@@ -1199,7 +1198,7 @@ static ssize_t consistency_check_show(struct device *dev, ...@@ -1199,7 +1198,7 @@ static ssize_t consistency_check_show(struct device *dev,
if (!ldev_info) if (!ldev_info)
return -ENXIO; return -ENXIO;
ldev_num = ldev_info->ldev_num; ldev_num = ldev_info->ldev_num;
status = myrs_get_ldev_info(cs, ldev_num, ldev_info); myrs_get_ldev_info(cs, ldev_num, ldev_info);
if (ldev_info->cc_active) if (ldev_info->cc_active)
return snprintf(buf, 32, "checking block %zu of %zu\n", return snprintf(buf, 32, "checking block %zu of %zu\n",
(size_t)ldev_info->cc_lba, (size_t)ldev_info->cc_lba,
...@@ -1981,14 +1980,13 @@ myrs_get_resync(struct device *dev) ...@@ -1981,14 +1980,13 @@ myrs_get_resync(struct device *dev)
struct myrs_hba *cs = shost_priv(sdev->host); struct myrs_hba *cs = shost_priv(sdev->host);
struct myrs_ldev_info *ldev_info = sdev->hostdata; struct myrs_ldev_info *ldev_info = sdev->hostdata;
u64 percent_complete = 0; u64 percent_complete = 0;
u8 status;
if (sdev->channel < cs->ctlr_info->physchan_present || !ldev_info) if (sdev->channel < cs->ctlr_info->physchan_present || !ldev_info)
return; return;
if (ldev_info->rbld_active) { if (ldev_info->rbld_active) {
unsigned short ldev_num = ldev_info->ldev_num; unsigned short ldev_num = ldev_info->ldev_num;
status = myrs_get_ldev_info(cs, ldev_num, ldev_info); myrs_get_ldev_info(cs, ldev_num, ldev_info);
percent_complete = ldev_info->rbld_lba * 100; percent_complete = ldev_info->rbld_lba * 100;
do_div(percent_complete, ldev_info->cfg_devsize); do_div(percent_complete, ldev_info->cfg_devsize);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment