Commit 8d153734 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

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.orgReviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 57cbd78e
...@@ -493,7 +493,6 @@ static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -493,7 +493,6 @@ static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent)
{ {
unsigned int rc, nhost = 0; unsigned int rc, nhost = 0;
struct mvs_info *mvi; struct mvs_info *mvi;
struct mvs_prv_info *mpi;
irq_handler_t irq_handler = mvs_interrupt; irq_handler_t irq_handler = mvs_interrupt;
struct Scsi_Host *shost = NULL; struct Scsi_Host *shost = NULL;
const struct mvs_chip_info *chip; 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) ...@@ -558,10 +557,13 @@ static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent)
} }
nhost++; nhost++;
} while (nhost < chip->n_host); } while (nhost < chip->n_host);
mpi = (struct mvs_prv_info *)(SHOST_TO_SAS_HA(shost)->lldd_ha);
#ifdef CONFIG_SCSI_MVSAS_TASKLET #ifdef CONFIG_SCSI_MVSAS_TASKLET
{
struct mvs_prv_info *mpi = SHOST_TO_SAS_HA(shost)->lldd_ha;
tasklet_init(&(mpi->mv_tasklet), mvs_tasklet, tasklet_init(&(mpi->mv_tasklet), mvs_tasklet,
(unsigned long)SHOST_TO_SAS_HA(shost)); (unsigned long)SHOST_TO_SAS_HA(shost));
}
#endif #endif
mvs_post_sas_ha_init(shost, chip); mvs_post_sas_ha_init(shost, chip);
......
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