* drivers/tty/goldfish.c:95:12-13: WARNING opportunity for min()
@ 2022-02-24 21:43 kernel test robot
2022-02-24 21:33 ` [PATCH] coccinelle: misc: fix minmax.cocci warnings kernel test robot
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2022-02-24 21:43 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1102 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: 25 hours ago
:::::: commit date: 10 months ago
config: x86_64-randconfig-c022 (https://download.01.org/0day-ci/archive/20220225/202202250530.QlncEEBQ-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/tty/goldfish.c:95: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] 4+ messages in thread
* [PATCH] coccinelle: misc: fix minmax.cocci warnings
2022-02-24 21:43 drivers/tty/goldfish.c:95:12-13: WARNING opportunity for min() kernel test robot
@ 2022-02-24 21:33 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-02-24 21:33 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1610 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: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Jiri Slaby <jirislaby@kernel.org>
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
drivers/tty/goldfish.c:95:12-13: WARNING opportunity for min()
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: 25 hours ago
:::::: commit date: 10 months ago
Please take the patch only if it's a positive warning. Thanks!
drivers/tty/goldfish.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/tty/goldfish.c
+++ b/drivers/tty/goldfish.c
@@ -92,7 +92,7 @@ static void goldfish_tty_rw(struct goldf
while (addr < addr_end) {
unsigned long pg_end = (addr & PAGE_MASK) + PAGE_SIZE;
unsigned long next =
- pg_end < addr_end ? pg_end : addr_end;
+ min(pg_end, addr_end);
unsigned long avail = next - addr;
/*
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/tty/goldfish.c:95:12-13: WARNING opportunity for min()
@ 2022-03-31 1:56 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-03-31 1:56 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1052 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: 74164d284b2909de0ba13518cc063e9ea9334749
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script
date: 11 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 11 months ago
config: x86_64-randconfig-c022 (https://download.01.org/0day-ci/archive/20220331/202203310917.O9uawonS-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/tty/goldfish.c:95:12-13: 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] 4+ messages in thread
* drivers/tty/goldfish.c:95:12-13: WARNING opportunity for min()
@ 2022-04-16 17:52 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-04-16 17:52 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1042 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: 59250f8a7f3a60a2661b84cbafc1e0eb5d05ec9b
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script
date: 12 months ago
:::::: branch date: 19 hours ago
:::::: commit date: 12 months ago
config: x86_64-randconfig-c022 (https://download.01.org/0day-ci/archive/20220417/202204170102.nEbrjlA2-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.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/tty/goldfish.c:95:12-13: 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] 4+ messages in thread
end of thread, other threads:[~2022-04-16 17:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-24 21:43 drivers/tty/goldfish.c:95:12-13: WARNING opportunity for min() kernel test robot
2022-02-24 21:33 ` [PATCH] coccinelle: misc: fix minmax.cocci warnings kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-03-31 1:56 drivers/tty/goldfish.c:95:12-13: WARNING opportunity for min() kernel test robot
2022-04-16 17:52 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.