From: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
To: agross@kernel.org
Cc: bjorn.andersson@linaro.org, linus.walleij@linaro.org,
linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org,
Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Subject: [PATCH] pinctrl: qcom: spmi-gpio: Assign boolean values to a bool variable
Date: Wed, 20 Jan 2021 15:29:17 +0800 [thread overview]
Message-ID: <1611127757-52999-1-git-send-email-abaci-bugfix@linux.alibaba.com> (raw)
Fix the following coccicheck warnings:
./drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c:340:3-15: WARNING:
Assignment of 0/1 to bool variable.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
---
drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
index b5949f7..eb0b60c 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
@@ -331,13 +331,13 @@ static int pm8xxx_pin_config_set(struct pinctrl_dev *pctldev,
case PIN_CONFIG_BIAS_DISABLE:
pin->bias = PM8XXX_GPIO_BIAS_NP;
banks |= BIT(2);
- pin->disable = 0;
+ pin->disable = false;
banks |= BIT(3);
break;
case PIN_CONFIG_BIAS_PULL_DOWN:
pin->bias = PM8XXX_GPIO_BIAS_PD;
banks |= BIT(2);
- pin->disable = 0;
+ pin->disable = false;
banks |= BIT(3);
break;
case PM8XXX_QCOM_PULL_UP_STRENGTH:
@@ -350,11 +350,11 @@ static int pm8xxx_pin_config_set(struct pinctrl_dev *pctldev,
case PIN_CONFIG_BIAS_PULL_UP:
pin->bias = pin->pull_up_strength;
banks |= BIT(2);
- pin->disable = 0;
+ pin->disable = false;
banks |= BIT(3);
break;
case PIN_CONFIG_BIAS_HIGH_IMPEDANCE:
- pin->disable = 1;
+ pin->disable = true;
banks |= BIT(3);
break;
case PIN_CONFIG_INPUT_ENABLE:
--
1.8.3.1
next reply other threads:[~2021-01-20 7:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 7:29 Jiapeng Zhong [this message]
2021-01-21 3:19 ` [PATCH] pinctrl: qcom: spmi-gpio: Assign boolean values to a bool variable Bjorn Andersson
2021-01-22 13:16 ` Linus Walleij
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=1611127757-52999-1-git-send-email-abaci-bugfix@linux.alibaba.com \
--to=abaci-bugfix@linux.alibaba.com \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).