[PATCH 04/14] scsi: cxlflash: Replaced ternary operation in write_same16 with min()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux