CC: [email protected] BCC: [email protected] CC: [email protected] TO: Denis Efremov <[email protected]> CC: Julia Lawall <[email protected]> CC: "Manoj N. Kumar" <[email protected]> CC: "Matthew R. Ochs" <[email protected]> CC: Uma Krishnan <[email protected]> CC: "James E.J. Bottomley" <[email protected]> CC: "Martin K. Petersen" <[email protected]> CC: [email protected] CC: [email protected]
From: kernel test robot <[email protected]> drivers/scsi/cxlflash/vlun.c:448:30-31: WARNING opportunity for min() Check for opencoded min(), max() implementations. Generated patches sometimes require adding a cast to fix compile warning. Warnings/patches scope intentionally limited to a function body. Generated by: scripts/coccinelle/misc/minmax.cocci CC: Denis Efremov <[email protected]> Reported-by: kernel test robot <[email protected]> Signed-off-by: kernel test robot <[email protected]> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 34e047aa16c0123bbae8e2f6df33e5ecc1f56601 commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script :::::: branch date: 33 hours ago :::::: commit date: 11 months ago Please take the patch only if it's a positive warning. Thanks! drivers/scsi/cxlflash/vlun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/cxlflash/vlun.c +++ b/drivers/scsi/cxlflash/vlun.c @@ -445,7 +445,7 @@ static int write_same16(struct scsi_devi 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 semahpore across lengthy call */ _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
