summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hosts.c
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2021-11-04 02:46:00 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2021-11-04 02:46:00 +0100
commit6266f7df38e167a2386ee2747965c4816f32b449 (patch)
treeff3d243efd8c374d2c9686de4a104da71218a952 /drivers/scsi/hosts.c
parentscsi: core: Avoid leaving shost->last_reset with stale value if EH does not run (diff)
parentscsi: ufs: ufshpb: Remove HPB2.0 flows (diff)
downloadlinux-6266f7df38e167a2386ee2747965c4816f32b449.tar.xz
linux-6266f7df38e167a2386ee2747965c4816f32b449.zip
Merge branch '5.15/scsi-fixes' into 5.16/scsi-queue
The partial UFS revert in 5.15 is needed for some additional fixes in the 5.16 SCSI tree. Merge the fixes branch. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r--drivers/scsi/hosts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 2cb7163e24cc..8049b00b6766 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -220,7 +220,8 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev,
goto fail;
}
- shost->cmd_per_lun = min_t(short, shost->cmd_per_lun,
+ /* Use min_t(int, ...) in case shost->can_queue exceeds SHRT_MAX */
+ shost->cmd_per_lun = min_t(int, shost->cmd_per_lun,
shost->can_queue);
error = scsi_init_sense_cache(shost);