* [PATCH] coccinelle: misc: fix minmax.cocci warnings
2022-02-14 3:48 drivers/usb/host/xhci-mem.c:436:27-28: WARNING opportunity for max() kernel test robot
@ 2022-02-14 3:45 ` kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-02-14 3:45 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1760 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: Mathias Nyman <mathias.nyman@intel.com>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: linux-usb(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
drivers/usb/host/xhci-mem.c:436:27-28: 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: 754e0b0e35608ed5206d6a67a791563c631cec07
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script
:::::: branch date: 8 hours ago
:::::: commit date: 10 months ago
Please take the patch only if it's a positive warning. Thanks!
drivers/usb/host/xhci-mem.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -433,8 +433,7 @@ int xhci_ring_expansion(struct xhci_hcd
(TRBS_PER_SEGMENT - 1);
/* Allocate number of segments we needed, or double the ring size */
- num_segs = ring->num_segs > num_segs_needed ?
- ring->num_segs : num_segs_needed;
+ num_segs = max(ring->num_segs, num_segs_needed);
ret = xhci_alloc_segments_for_ring(xhci, &first, &last,
num_segs, ring->cycle_state, ring->type,
^ permalink raw reply [flat|nested] 5+ messages in thread
* drivers/usb/host/xhci-mem.c:436:27-28: WARNING opportunity for max()
@ 2022-02-14 3:48 kernel test robot
2022-02-14 3:45 ` [PATCH] coccinelle: misc: fix minmax.cocci warnings kernel test robot
0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2022-02-14 3:48 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1166 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: 754e0b0e35608ed5206d6a67a791563c631cec07
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script
date: 10 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 10 months ago
config: alpha-randconfig-c024-20220208 (https://download.01.org/0day-ci/archive/20220214/202202141111.f3sebCI1-lkp(a)intel.com/config)
compiler: alpha-linux-gcc (GCC) 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/usb/host/xhci-mem.c:436:27-28: WARNING opportunity for max()
--
>> drivers/usb/host/xhci.c:4986:15-16: WARNING opportunity for max()
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] 5+ messages in thread
* drivers/usb/host/xhci-mem.c:436:27-28: WARNING opportunity for max()
@ 2022-02-15 7:36 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-02-15 7:36 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1167 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: d567f5db412ed52de0b3b3efca4a451263de6108
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script
date: 10 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 10 months ago
config: alpha-randconfig-c024-20220208 (https://download.01.org/0day-ci/archive/20220215/202202151512.qXGGDGQb-lkp(a)intel.com/config)
compiler: alpha-linux-gcc (GCC) 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/usb/host/xhci-mem.c:436:27-28: WARNING opportunity for max()
--
>> drivers/usb/host/xhci.c:4986:15-16: WARNING opportunity for max()
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] 5+ messages in thread
* drivers/usb/host/xhci-mem.c:436:27-28: WARNING opportunity for max()
@ 2022-02-12 2:29 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-02-12 2:29 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1166 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: 83e396641110663d3c7bb25b9bc0c6a750359ecf
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script
date: 10 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 10 months ago
config: alpha-randconfig-c024-20220208 (https://download.01.org/0day-ci/archive/20220212/202202121051.O32SM0gn-lkp(a)intel.com/config)
compiler: alpha-linux-gcc (GCC) 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/usb/host/xhci-mem.c:436:27-28: WARNING opportunity for max()
--
>> drivers/usb/host/xhci.c:4986:15-16: WARNING opportunity for max()
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] 5+ messages in thread
* drivers/usb/host/xhci-mem.c:436:27-28: WARNING opportunity for max()
@ 2022-02-09 4:09 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-02-09 4:09 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1164 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: e6251ab4551f51fa4cee03523e08051898c3ce82
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script
date: 9 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 9 months ago
config: alpha-randconfig-c024-20220208 (https://download.01.org/0day-ci/archive/20220209/202202091223.tdxkVdRU-lkp(a)intel.com/config)
compiler: alpha-linux-gcc (GCC) 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/usb/host/xhci-mem.c:436:27-28: WARNING opportunity for max()
--
>> drivers/usb/host/xhci.c:4986:15-16: WARNING opportunity for max()
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] 5+ messages in thread
end of thread, other threads:[~2022-02-15 7:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 3:48 drivers/usb/host/xhci-mem.c:436:27-28: WARNING opportunity for max() kernel test robot
2022-02-14 3:45 ` [PATCH] coccinelle: misc: fix minmax.cocci warnings kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-02-15 7:36 drivers/usb/host/xhci-mem.c:436:27-28: WARNING opportunity for max() kernel test robot
2022-02-12 2:29 kernel test robot
2022-02-09 4:09 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.