From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] pinctrl: ocelot: fix boolconv.cocci warnings
Date: Tue, 29 Sep 2020 13:32:07 +0800 [thread overview]
Message-ID: <20200929053207.GA89592@4c40a53db24b> (raw)
In-Reply-To: <202009291304.GfETny5x-lkp@intel.com>
[-- 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 */
prev parent reply other threads:[~2020-09-29 5:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200929053207.GA89592@4c40a53db24b \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.