* drivers/net/can/janz-ican3.c:1834:8-16: WARNING: use scnprintf or sprintf
@ 2020-12-07 6:03 kernel test robot
2020-12-07 6:03 ` [PATCH] coccinelle: api: fix device_attr_show.cocci warnings kernel test robot
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2020-12-07 6:03 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0477e92881850d44910a7e94fc2c46f96faa131f
commit: abfc19ff202d287742483e15fd478ddd6ada2187 coccinelle: api: add device_attr_show script
date: 4 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 4 months ago
config: i386-randconfig-c003-20201207 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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>
"coccinelle warnings: (new ones prefixed by >>)"
>> drivers/net/can/janz-ican3.c:1834:8-16: WARNING: use scnprintf or sprintf
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
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33756 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] coccinelle: api: fix device_attr_show.cocci warnings
2020-12-07 6:03 drivers/net/can/janz-ican3.c:1834:8-16: WARNING: use scnprintf or sprintf kernel test robot
@ 2020-12-07 6:03 ` kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-12-07 6:03 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Wolfgang Grandegger <wg@grandegger.com>
CC: "Marc Kleine-Budde" <mkl@pengutronix.de>
CC: Jakub Kicinski <kuba@kernel.org>
CC: linux-can(a)vger.kernel.org
CC: netdev(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
drivers/net/can/janz-ican3.c:1834:8-16: WARNING: use scnprintf or sprintf
From Documentation/filesystems/sysfs.txt:
show() must not use snprintf() when formatting the value to be
returned to user space. If you can guarantee that an overflow
will never happen you can use sprintf() otherwise you must use
scnprintf().
Generated by: scripts/coccinelle/api/device_attr_show.cocci
Fixes: abfc19ff202d ("coccinelle: api: add device_attr_show script")
CC: Denis Efremov <efremov@linux.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0477e92881850d44910a7e94fc2c46f96faa131f
commit: abfc19ff202d287742483e15fd478ddd6ada2187 coccinelle: api: add device_attr_show script
:::::: branch date: 8 hours ago
:::::: commit date: 4 months ago
Please take the patch only if it's a positive warning. Thanks!
janz-ican3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/can/janz-ican3.c
+++ b/drivers/net/can/janz-ican3.c
@@ -1831,7 +1831,7 @@ static ssize_t ican3_sysfs_show_term(str
return -ETIMEDOUT;
}
- return snprintf(buf, PAGE_SIZE, "%u\n", mod->termination_enabled);
+ return scnprintf(buf, PAGE_SIZE, "%u\n", mod->termination_enabled);
}
static ssize_t ican3_sysfs_set_term(struct device *dev,
^ permalink raw reply [flat|nested] 3+ messages in thread
* drivers/net/can/janz-ican3.c:1834:8-16: WARNING: use scnprintf or sprintf
@ 2020-11-12 1:20 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-11-12 1:20 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d5e28bff7ad55aea081c1af516cc1c94a5eca7d
commit: abfc19ff202d287742483e15fd478ddd6ada2187 coccinelle: api: add device_attr_show script
date: 3 months ago
:::::: branch date: 3 hours ago
:::::: commit date: 3 months ago
config: i386-randconfig-c001-20201111 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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>
"coccinelle warnings: (new ones prefixed by >>)"
>> drivers/net/can/janz-ican3.c:1834:8-16: WARNING: use scnprintf or sprintf
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
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30138 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-07 6:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-07 6:03 drivers/net/can/janz-ican3.c:1834:8-16: WARNING: use scnprintf or sprintf kernel test robot
2020-12-07 6:03 ` [PATCH] coccinelle: api: fix device_attr_show.cocci warnings kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2020-11-12 1:20 drivers/net/can/janz-ican3.c:1834:8-16: WARNING: use scnprintf or sprintf 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.