Signed-off-by: Prabhakar Pujeri <prabhakar.pujeri@xxxxxxxxx> --- drivers/scsi/cxlflash/vlun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/cxlflash/vlun.c b/drivers/scsi/cxlflash/vlun.c index 35326e311991..e39ef6967d5d 100644 --- a/drivers/scsi/cxlflash/vlun.c +++ b/drivers/scsi/cxlflash/vlun.c @@ -445,7 +445,7 @@ static int write_same16(struct scsi_device *sdev, scsi_cmd[0] = WRITE_SAME_16; scsi_cmd[1] = cfg->ws_unmap ? 0x8 : 0; put_unaligned_be64(offset, &scsi_cmd[2]); - put_unaligned_be32(ws_limit < left ? ws_limit : left, + put_unaligned_be32(min(ws_limit, left), &scsi_cmd[10]); /* Drop the ioctl read semaphore across lengthy call */ -- 2.45.1