CC: [email protected] BCC: [email protected] CC: [email protected] CC: Michal Simek <[email protected]>
From: kernel test robot <[email protected]> drivers/remoteproc/remoteproc_sysfs.c:244:17-19: 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 Reported-by: kernel test robot <[email protected]> Signed-off-by: kernel test robot <[email protected]> --- tree: https://github.com/Xilinx/linux-xlnx master head: d7d99e0d1629b249f6b118eb6a8e492e4334b1ea commit: 9b62852ec04b7d48971ce8016b13c27403929908 [30/530] Merge tag 'v5.15' into master :::::: branch date: 3 days ago :::::: commit date: 5 months ago Please take the patch only if it's a positive warning. Thanks! drivers/remoteproc/remoteproc_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/remoteproc/remoteproc_sysfs.c +++ b/drivers/remoteproc/remoteproc_sysfs.c @@ -241,7 +241,7 @@ static ssize_t kick_store(struct device size_t cpy_len; (void)attr; - cpy_len = count <= sizeof(id) ? count : sizeof(id); + cpy_len = min(count, sizeof(id)); memcpy((char *)(&id), buf, cpy_len); if (rproc->ops->kick) _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
