diff options
author | Bart Van Assche <bvanassche@acm.org> | 2023-08-22 17:30:41 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-08-25 04:11:29 +0200 |
commit | 79519528a180c64a90863db2ce70887de6c49d16 (patch) | |
tree | aa81282161211f08a39aecdc2e40d4e512915b3c /include/scsi | |
parent | scsi: qedi: Remove unused declarations (diff) | |
download | linux-79519528a180c64a90863db2ce70887de6c49d16.tar.xz linux-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 'include/scsi')
-rw-r--r-- | include/scsi/scsi_host.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index a2b8d30c4c80..49f768d0ff37 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -764,7 +764,7 @@ scsi_template_proc_dir(const struct scsi_host_template *sht); #define scsi_template_proc_dir(sht) NULL #endif extern void scsi_scan_host(struct Scsi_Host *); -extern void scsi_rescan_device(struct device *); +extern void scsi_rescan_device(struct scsi_device *); extern void scsi_remove_host(struct Scsi_Host *); extern struct Scsi_Host *scsi_host_get(struct Scsi_Host *); extern int scsi_host_busy(struct Scsi_Host *shost); |