From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8065494300572188202==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] pinctrl: ocelot: fix boolconv.cocci warnings Date: Tue, 29 Sep 2020 13:32:07 +0800 Message-ID: <20200929053207.GA89592@4c40a53db24b> In-Reply-To: <202009291304.GfETny5x-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============8065494300572188202== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 Sparx= 5 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 =3D=3D PIN_CONFIG_BIAS_DISABLE) - val =3D (val =3D=3D 0 ? true : false); + val =3D (val =3D=3D 0); else if (param =3D=3D PIN_CONFIG_BIAS_PULL_DOWN) val =3D (val & BIAS_PD_BIT ? true : false); else /* PIN_CONFIG_BIAS_PULL_UP */ --===============8065494300572188202==--