diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2021-11-04 04:46:00 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-11-04 04:46:00 +0300 |
commit | 6266f7df38e167a2386ee2747965c4816f32b449 (patch) | |
tree | ff3d243efd8c374d2c9686de4a104da71218a952 /drivers/scsi/hosts.c | |
parent | 5ae17501bc62a49b0b193dcce003f16375f16654 (diff) | |
parent | 09d9e4d041876684d33f21d02bcdaea6586734f1 (diff) |
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.c | 3 |
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); |