CC: [email protected] BCC: [email protected] CC: [email protected] TO: Denis Efremov <[email protected]> CC: Julia Lawall <[email protected]> CC: Alan Stern <[email protected]> CC: "Greg Kroah-Hartman" <[email protected]> CC: [email protected] CC: [email protected] CC: [email protected]
From: kernel test robot <[email protected]> drivers/usb/storage/realtek_cr.c:264:20-21: 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: 56e337f2cf1326323844927a04e9dbce9a244835 commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script :::::: branch date: 24 hours ago :::::: commit date: 11 months ago Please take the patch only if it's a positive warning. Thanks! drivers/usb/storage/realtek_cr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/storage/realtek_cr.c +++ b/drivers/usb/storage/realtek_cr.c @@ -261,7 +261,7 @@ static int rts51x_bulk_transport(struct * was really transferred and what the device tells us */ if (residue) - residue = residue < buf_len ? residue : buf_len; + residue = min(residue, buf_len); if (act_len) *act_len = buf_len - residue; _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
