* kernel/irq/affinity.c:399:12-13: WARNING opportunity for min()
@ 2022-02-24 5:56 kernel test robot
2022-02-24 5:49 ` [PATCH] coccinelle: misc: fix minmax.cocci warnings kernel test robot
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-02-24 5:56 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@inria.fr>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 23d04328444a8fa0ca060c5e532220dac8e8bc26
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script
date: 10 months ago
:::::: branch date: 10 hours ago
:::::: commit date: 10 months ago
config: x86_64-randconfig-c002-20220221 (https://download.01.org/0day-ci/archive/20220224/202202241330.RWDVbpDh-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 >>)
>> kernel/irq/affinity.c:399:12-13: WARNING opportunity for min()
--
>> kernel/audit.c:1512:12-13: WARNING opportunity for min()
--
>> kernel/time/clockevents.c:75:12-13: WARNING opportunity for max()
--
>> kernel/time/tick-sched.c:772:23-24: WARNING opportunity for min()
--
>> kernel/trace/trace.c:8100:12-13: 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] 3+ messages in thread
* [PATCH] coccinelle: misc: fix minmax.cocci warnings
2022-02-24 5:56 kernel/irq/affinity.c:399:12-13: WARNING opportunity for min() kernel test robot
@ 2022-02-24 5:49 ` kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-02-24 5:49 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1483 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@inria.fr>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
kernel/time/clockevents.c:75:12-13: WARNING opportunity for max()
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
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: 23d04328444a8fa0ca060c5e532220dac8e8bc26
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script
:::::: branch date: 10 hours ago
:::::: commit date: 10 months ago
Please take the patch only if it's a positive warning. Thanks!
kernel/time/clockevents.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -72,7 +72,7 @@ static u64 cev_delta2ns(unsigned long la
do_div(clc, evt->mult);
/* Deltas less than 1usec are pointless noise */
- return clc > 1000 ? clc : 1000;
+ return max(clc, 1000);
}
/**
^ permalink raw reply [flat|nested] 3+ messages in thread
* kernel/irq/affinity.c:399:12-13: WARNING opportunity for min()
@ 2022-02-23 13:09 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-02-23 13:09 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1373 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@inria.fr>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5c1ee569660d4a205dced9cb4d0306b907fb7599
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script
date: 10 months ago
:::::: branch date: 13 hours ago
:::::: commit date: 10 months ago
config: x86_64-randconfig-c002-20220221 (https://download.01.org/0day-ci/archive/20220223/202202232117.F13tHPz0-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 >>)
>> kernel/irq/affinity.c:399:12-13: WARNING opportunity for min()
--
>> kernel/audit.c:1512:12-13: WARNING opportunity for min()
--
>> kernel/time/clockevents.c:75:12-13: WARNING opportunity for max()
--
>> kernel/time/tick-sched.c:772:23-24: WARNING opportunity for min()
--
>> kernel/trace/trace.c:8100:12-13: 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] 3+ messages in thread
end of thread, other threads:[~2022-02-24 5:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24 5:56 kernel/irq/affinity.c:399:12-13: WARNING opportunity for min() kernel test robot
2022-02-24 5:49 ` [PATCH] coccinelle: misc: fix minmax.cocci warnings kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-02-23 13:09 kernel/irq/affinity.c:399:12-13: WARNING opportunity for min() 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.