All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remoteproc: fix minmax.cocci warnings
@ 2022-02-08 20:41 ` Julia Lawall
  0 siblings, 0 replies; 9+ messages in thread
From: Julia Lawall @ 2022-02-08 20:41 UTC (permalink / raw)
  To: Wendy Liang, Michal Simek, Ohad Ben-Cohen, Bjorn Andersson,
	Mathieu Poirier
  Cc: linux-remoteproc, linux-kernel, kbuild-all, linux-arm-kernel

From: kernel test robot <lkp@intel.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@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.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)

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [xilinx-xlnx:xlnx_rebase_v5.15_LTS 550/1181] drivers/remoteproc/remoteproc_sysfs.c:244:17-19: WARNING opportunity for min()
@ 2022-06-19 13:34 kernel test robot
  2022-06-19 13:31 ` [PATCH] remoteproc: fix minmax.cocci warnings kernel test robot
  0 siblings, 1 reply; 9+ messages in thread
From: kernel test robot @ 2022-06-19 13:34 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-arm-kernel(a)lists.infradead.org
TO: Wendy Liang <wendy.liang@xilinx.com>
CC: Michal Simek <monstr@monstr.eu>

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
config: s390-randconfig-c024-20220619 (https://download.01.org/0day-ci/archive/20220619/202206192126.xAUNQOxi-lkp(a)intel.com/config)
compiler: s390-linux-gcc (GCC) 11.3.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


cocci warnings: (new ones prefixed by >>)
>> drivers/remoteproc/remoteproc_sysfs.c:244:17-19: WARNING opportunity for min()

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [xilinx-xlnx:xlnx_rebase_v5.15_LTS 550/1029] drivers/remoteproc/remoteproc_sysfs.c:244:17-19: WARNING opportunity for min()
@ 2022-03-26  0:47 kernel test robot
  2022-03-26  0:41 ` [PATCH] remoteproc: fix minmax.cocci warnings kernel test robot
  0 siblings, 1 reply; 9+ messages in thread
From: kernel test robot @ 2022-03-26  0:47 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-arm-kernel(a)lists.infradead.org
TO: Wendy Liang <wendy.liang@xilinx.com>
CC: Michal Simek <monstr@monstr.eu>

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head:   1870e0fa79a9d58c6748c34550f3ccea0b515933
commit: 2b9408d09dc6367fd2f0820f0c7beab69e9aed56 [550/1029] remoteproc: Add support for peek from remote and acking kick from remote
:::::: branch date: 35 hours ago
:::::: commit date: 8 weeks ago
config: x86_64-randconfig-c022 (https://download.01.org/0day-ci/archive/20220326/202203260836.0xy9451H-lkp(a)intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


cocci warnings: (new ones prefixed by >>)
>> drivers/remoteproc/remoteproc_sysfs.c:244:17-19: WARNING opportunity for min()

Please review and possibly fold the followup patch.

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [xilinx-xlnx:xlnx_rebase_v5.15 550/872] drivers/remoteproc/remoteproc_sysfs.c:244:17-19: WARNING opportunity for min()
@ 2022-02-08 17:11 kernel test robot
  2022-02-08 17:05 ` [PATCH] remoteproc: fix minmax.cocci warnings kernel test robot
  0 siblings, 1 reply; 9+ messages in thread
From: kernel test robot @ 2022-02-08 17:11 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-arm-kernel(a)lists.infradead.org
TO: Wendy Liang <wendy.liang@xilinx.com>
CC: Michal Simek <monstr@monstr.eu>

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
config: x86_64-randconfig-c022 (https://download.01.org/0day-ci/archive/20220209/202202090148.vR3UdeMM-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


cocci warnings: (new ones prefixed by >>)
>> drivers/remoteproc/remoteproc_sysfs.c:244:17-19: WARNING opportunity for min()

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-06-19 13:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-08 20:41 [PATCH] remoteproc: fix minmax.cocci warnings Julia Lawall
2022-02-08 20:41 ` Julia Lawall
2022-02-08 20:41 ` Julia Lawall
2022-02-10 17:58 ` Mathieu Poirier
2022-02-10 17:58   ` Mathieu Poirier
2022-02-10 17:58   ` Mathieu Poirier
  -- strict thread matches above, loose matches on Subject: below --
2022-06-19 13:34 [xilinx-xlnx:xlnx_rebase_v5.15_LTS 550/1181] drivers/remoteproc/remoteproc_sysfs.c:244:17-19: WARNING opportunity for min() kernel test robot
2022-06-19 13:31 ` [PATCH] remoteproc: fix minmax.cocci warnings kernel test robot
2022-03-26  0:47 [xilinx-xlnx:xlnx_rebase_v5.15_LTS 550/1029] drivers/remoteproc/remoteproc_sysfs.c:244:17-19: WARNING opportunity for min() kernel test robot
2022-03-26  0:41 ` [PATCH] remoteproc: fix minmax.cocci warnings kernel test robot
2022-02-08 17:11 [xilinx-xlnx:xlnx_rebase_v5.15 550/872] drivers/remoteproc/remoteproc_sysfs.c:244:17-19: WARNING opportunity for min() kernel test robot
2022-02-08 17:05 ` [PATCH] remoteproc: fix minmax.cocci warnings kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.