CC: kbuild-all(a)lists.01.org CC: linux-kernel(a)vger.kernel.org TO: Lars Povlsen CC: Linus Walleij CC: Alexandre Belloni CC: linux-gpio(a)vger.kernel.org CC: linux-kernel(a)vger.kernel.org From: kernel test robot 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 Signed-off-by: kernel test robot --- 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 */