diff options
author | Bart Van Assche <bvanassche@acm.org> | 2022-02-18 20:51:03 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-02-23 03:11:06 +0100 |
commit | 8d1537342ff20719b2dad3ad67f84f7a085546fd (patch) | |
tree | 0353ce4a43bdc9b686a81964628d2e9a33d81a96 /drivers/scsi/mvsas | |
parent | scsi: mesh: Move the SCSI pointer to private command data (diff) | |
download | linux-8d1537342ff20719b2dad3ad67f84f7a085546fd.tar.xz linux-8d1537342ff20719b2dad3ad67f84f7a085546fd.zip |
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.c | 6 |
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); |