All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/pinctrl/pinctrl-ocelot.c:732:28-33: WARNING: conversion to bool not needed here
@ 2020-09-29  5:32 kernel test robot
  2020-09-29  5:32 ` [PATCH] pinctrl: ocelot: fix boolconv.cocci warnings kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-09-29  5:32 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Lars Povlsen <lars.povlsen@microchip.com>
CC: Linus Walleij <linus.walleij@linaro.org>
CC: Alexandre Belloni <alexandre.belloni@bootlin.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   fb0155a09b0224a7147cb07a4ce6034c8d29667f
commit: f8a7476077eaac1ba9dc18f70c99d2311edd59ee pinctrl: ocelot: Add Sparx5 SoC support
date:   3 months ago
:::::: branch date: 11 hours ago
:::::: commit date: 3 months ago
config: sh-randconfig-c003-20200929 (attached as .config)
compiler: sh4-linux-gcc (GCC) 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/pinctrl/pinctrl-ocelot.c:732:28-33: WARNING: conversion to bool not needed here

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: 24813 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] pinctrl: ocelot: fix boolconv.cocci warnings
  2020-09-29  5:32 drivers/pinctrl/pinctrl-ocelot.c:732:28-33: WARNING: conversion to bool not needed here kernel test robot
@ 2020-09-29  5:32 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-09-29  5:32 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Lars Povlsen <lars.povlsen@microchip.com>
CC: Linus Walleij <linus.walleij@linaro.org>
CC: Alexandre Belloni <alexandre.belloni@bootlin.com>
CC: linux-gpio(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/pinctrl/pinctrl-ocelot.c:732:28-33: WARNING: conversion to bool not needed here

 Remove unneeded conversion to bool

Semantic patch information:
 Relational and logical operators evaluate to bool,
 explicit conversion is overly verbose and unneeded.

Generated by: scripts/coccinelle/misc/boolconv.cocci

Fixes: f8a7476077ea ("pinctrl: ocelot: Add Sparx5 SoC support")
CC: Lars Povlsen <lars.povlsen@microchip.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:   fb0155a09b0224a7147cb07a4ce6034c8d29667f
commit: f8a7476077eaac1ba9dc18f70c99d2311edd59ee pinctrl: ocelot: Add Sparx5 SoC support
:::::: branch date: 11 hours ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 pinctrl-ocelot.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -729,7 +729,7 @@ static int ocelot_pinconf_get(struct pin
 		if (err)
 			return err;
 		if (param == PIN_CONFIG_BIAS_DISABLE)
-			val = (val == 0 ? true : false);
+			val = (val == 0);
 		else if (param == PIN_CONFIG_BIAS_PULL_DOWN)
 			val = (val & BIAS_PD_BIT ? true : false);
 		else    /* PIN_CONFIG_BIAS_PULL_UP */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-29  5:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29  5:32 drivers/pinctrl/pinctrl-ocelot.c:732:28-33: WARNING: conversion to bool not needed here kernel test robot
2020-09-29  5:32 ` [PATCH] pinctrl: ocelot: fix boolconv.cocci warnings 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.