summaryrefslogtreecommitdiff
path: root/drivers/scsi/mvsas
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2022-02-18 22:51:03 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-02-23 05:11:06 +0300
commit8d1537342ff20719b2dad3ad67f84f7a085546fd (patch)
tree0353ce4a43bdc9b686a81964628d2e9a33d81a96 /drivers/scsi/mvsas
parent57cbd78e61cf15269f4149669b51b94028263dc1 (diff)
downloadlinux-8d1537342ff20719b2dad3ad67f84f7a085546fd.tar.xz
scsi: mvsas: Fix a set-but-not-used warning
This patch fixes the following compiler warning: drivers/scsi/mvsas/mv_init.c: In function ‘mvs_pci_init’: drivers/scsi/mvsas/mv_init.c:497:30: warning: variable ‘mpi’ set but not used [-Wunused-but-set-variable] 497 | struct mvs_prv_info *mpi; | ^~~ Link: https://lore.kernel.org/r/20220218195117.25689-36-bvanassche@acm.org Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: John Garry <john.garry@huawei.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mvsas')
-rw-r--r--drivers/scsi/mvsas/mv_init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index d12fb210c868..7ac63eb5ccd3 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -493,7 +493,6 @@ static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent)
{
unsigned int rc, nhost = 0;
struct mvs_info *mvi;
- struct mvs_prv_info *mpi;
irq_handler_t irq_handler = mvs_interrupt;
struct Scsi_Host *shost = NULL;
const struct mvs_chip_info *chip;
@@ -558,10 +557,13 @@ static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent)
}
nhost++;
} while (nhost < chip->n_host);
- mpi = (struct mvs_prv_info *)(SHOST_TO_SAS_HA(shost)->lldd_ha);
#ifdef CONFIG_SCSI_MVSAS_TASKLET
+ {
+ struct mvs_prv_info *mpi = SHOST_TO_SAS_HA(shost)->lldd_ha;
+
tasklet_init(&(mpi->mv_tasklet), mvs_tasklet,
(unsigned long)SHOST_TO_SAS_HA(shost));
+ }
#endif
mvs_post_sas_ha_init(shost, chip);