* drivers/leds/leds-tca6507.c:246:14-15: WARNING opportunity for swap()
@ 2021-11-12 10:32 kernel test robot
2021-11-12 10:32 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-11-12 10:32 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1113 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: 5833291ab6de9c3e2374336b51c814e515e8f3a5
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
date: 7 months ago
:::::: branch date: 11 hours ago
:::::: commit date: 7 months ago
config: x86_64-randconfig-c002-20211014 (attached as .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/leds/leds-tca6507.c:246:14-15: WARNING opportunity for swap()
--
>> drivers/phy/cadence/phy-cadence-torrent.c:2127:18-19: WARNING opportunity for swap()
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: 33580 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] coccinelle: misc: fix swap.cocci warnings
2021-11-12 10:32 drivers/leds/leds-tca6507.c:246:14-15: WARNING opportunity for swap() kernel test robot
@ 2021-11-12 10:32 ` kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-11-12 10:32 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1445 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>
CC: Pavel Machek <pavel@ucw.cz>
CC: linux-leds(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
drivers/leds/leds-tca6507.c:246:14-15: WARNING opportunity for swap()
Check for opencoded swap() implementation.
Generated by: scripts/coccinelle/misc/swap.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: 5833291ab6de9c3e2374336b51c814e515e8f3a5
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
:::::: branch date: 11 hours ago
:::::: commit date: 7 months ago
Please take the patch only if it's a positive warning. Thanks!
leds-tca6507.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--- a/drivers/leds/leds-tca6507.c
+++ b/drivers/leds/leds-tca6507.c
@@ -241,11 +241,9 @@ static int choose_times(int msec, int *c
}
if (diff < 65536) {
int actual;
- if (msec & 1) {
- c1 = *c2p;
- *c2p = *c1p;
- *c1p = c1;
- }
+ if (msec & 1)
+
+ swap(*c2p, *c1p);
actual = time_codes[*c1p] + time_codes[*c2p];
if (*c1p < *c2p)
return actual + 1;
^ permalink raw reply [flat|nested] 3+ messages in thread
* drivers/leds/leds-tca6507.c:246:14-15: WARNING opportunity for swap()
@ 2021-12-11 15:42 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-12-11 15:42 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1172 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: 6f513529296fd4f696afb4354c46508abe646541
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
date: 7 months ago
:::::: branch date: 13 hours ago
:::::: commit date: 7 months ago
config: x86_64-randconfig-c022-20211210 (https://download.01.org/0day-ci/archive/20211211/202112112245.cEbaJtKw-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/leds/leds-tca6507.c:246:14-15: WARNING opportunity for swap()
--
>> drivers/w1/slaves/w1_therm.c:1840:18-19: WARNING opportunity for swap()
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:[~2021-12-11 15:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-12 10:32 drivers/leds/leds-tca6507.c:246:14-15: WARNING opportunity for swap() kernel test robot
2021-11-12 10:32 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-12-11 15:42 drivers/leds/leds-tca6507.c:246:14-15: WARNING opportunity for swap() 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.