diff options
author | Tony Battersby <tonyb@cybernetics.com> | 2023-08-14 10:03:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-09-23 10:46:58 +0200 |
commit | cb76e9ab54a22d9a0542c78e4ae1c3dd996e8c2d (patch) | |
tree | 9ea9d9df1fd8d8ed562381c4d7558d8bcc1e2979 | |
parent | 3bb207a29e3d38afd283dda5ea6ba8f2029d0def (diff) | |
download | linux-stable-cb76e9ab54a22d9a0542c78e4ae1c3dd996e8c2d.tar.gz linux-stable-cb76e9ab54a22d9a0542c78e4ae1c3dd996e8c2d.tar.bz2 linux-stable-cb76e9ab54a22d9a0542c78e4ae1c3dd996e8c2d.zip |
scsi: core: Use 32-bit hostnum in scsi_host_lookup()
[ Upstream commit 62ec2092095b678ff89ce4ba51c2938cd1e8e630 ]
Change scsi_host_lookup() hostnum argument type from unsigned short to
unsigned int to match the type used everywhere else.
Fixes: 6d49f63b415c ("[SCSI] Make host_no an unsigned int")
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Link: https://lore.kernel.org/r/a02497e7-c12b-ef15-47fc-3f0a0b00ffce@cybernetics.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/scsi/hosts.c | 4 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 27609b2ae544..493700ae19b4 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -555,7 +555,7 @@ EXPORT_SYMBOL(scsi_unregister); static int __scsi_host_match(struct device *dev, const void *data) { struct Scsi_Host *p; - const unsigned short *hostnum = data; + const unsigned int *hostnum = data; p = class_to_shost(dev); return p->host_no == *hostnum; @@ -572,7 +572,7 @@ static int __scsi_host_match(struct device *dev, const void *data) * that scsi_host_get() took. The put_device() below dropped * the reference from class_find_device(). **/ -struct Scsi_Host *scsi_host_lookup(unsigned short hostnum) +struct Scsi_Host *scsi_host_lookup(unsigned int hostnum) { struct device *cdev; struct Scsi_Host *shost = NULL; diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 9c1e4bad6581..1294b6ce9884 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -786,7 +786,7 @@ extern void scsi_rescan_device(struct device *); extern void scsi_remove_host(struct Scsi_Host *); extern struct Scsi_Host *scsi_host_get(struct Scsi_Host *); extern void scsi_host_put(struct Scsi_Host *t); -extern struct Scsi_Host *scsi_host_lookup(unsigned short); +extern struct Scsi_Host *scsi_host_lookup(unsigned int hostnum); extern const char *scsi_host_state_name(enum scsi_host_state); extern void scsi_cmd_get_serial(struct Scsi_Host *, struct scsi_cmnd *); |