[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2202082139180.52266@hadrien>
Date: Tue, 8 Feb 2022 21:41:39 +0100 (CET)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Wendy Liang <wendy.liang@...inx.com>,
Michal Simek <monstr@...str.eu>,
Ohad Ben-Cohen <ohad@...ery.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>
cc: linux-remoteproc@...r.kernel.org, linux-kernel@...r.kernel.org,
kbuild-all@...ts.01.org, linux-arm-kernel@...ts.infradead.org
Subject: [PATCH] remoteproc: fix minmax.cocci warnings
From: kernel test robot <lkp@...el.com>
The code seems more readable with min.
Generated by: scripts/coccinelle/misc/minmax.cocci
Fixes: 2b9408d09dc6 ("remoteproc: Add support for peek from remote and acking kick from remote")
CC: Wendy Liang <wendy.liang@...inx.com>
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: kernel test robot <lkp@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...ia.fr>
---
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head: 1183ce490adb103e5e569b8ebd74c50c885ddc05
commit: 2b9408d09dc6367fd2f0820f0c7beab69e9aed56 [550/872] remoteproc: Add support for peek from remote and acking kick from remote
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
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)
Powered by blists - more mailing lists