CC: [email protected]
BCC: [email protected]
CC: [email protected]
TO: Wendy Liang <[email protected]>
CC: Michal Simek <[email protected]>
CC: "Ohad Ben-Cohen" <[email protected]>
CC: Bjorn Andersson <[email protected]>
CC: Mathieu Poirier <[email protected]>
CC: [email protected]
CC: [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

Fixes: 2b9408d09dc6 ("remoteproc: Add support for peek from remote and acking 
kick from remote")
CC: Wendy Liang <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
---

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head:   59523b5c4aca0174f1f8cba2a07d3b3328b7c80e
commit: 2b9408d09dc6367fd2f0820f0c7beab69e9aed56 [550/1181] remoteproc: Add 
support for peek from remote and acking kick from remote
:::::: branch date: 4 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]

Reply via email to