summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mvumi.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2023-08-22 08:30:41 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2023-08-24 22:11:29 -0400
commit79519528a180c64a90863db2ce70887de6c49d16 (patch)
treeaa81282161211f08a39aecdc2e40d4e512915b3c /drivers/scsi/mvumi.c
parente1a87e29fbc8ff3507e16df312d52190efa5963d (diff)
downloadlinux-stable-79519528a180c64a90863db2ce70887de6c49d16.tar.gz
linux-stable-79519528a180c64a90863db2ce70887de6c49d16.tar.bz2
linux-stable-79519528a180c64a90863db2ce70887de6c49d16.zip
scsi: core: Improve type safety of scsi_rescan_device()
Most callers of scsi_rescan_device() have the scsi_device pointer readily available. Pass a struct scsi_device pointer to scsi_rescan_device() instead of a struct device pointer. This change prevents that a pointer to another struct device would be passed accidentally to scsi_rescan_device(). Remove the scsi_rescan_device() declaration from the scsi_priv.h header file since it duplicates the declaration in <scsi/scsi_host.h>. Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Cc: Mike Christie <michael.christie@oracle.com> Cc: Ming Lei <ming.lei@redhat.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230822153043.4046244-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mvumi.c')
-rw-r--r--drivers/scsi/mvumi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index 97f9d2fa6429..d9d366ec17dc 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -1500,7 +1500,7 @@ static void mvumi_rescan_devices(struct mvumi_hba *mhba, int id)
sdev = scsi_device_lookup(mhba->shost, 0, id, 0);
if (sdev) {
- scsi_rescan_device(&sdev->sdev_gendev);
+ scsi_rescan_device(sdev);
scsi_device_put(sdev);
}
}