From: Linus Walleij <linus.walleij@linaro.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>,
Andy Gross <agross@kernel.org>,
MSM <linux-arm-msm@vger.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pinctrl: qcom: spmi-gpio: Assign boolean values to a bool variable
Date: Fri, 22 Jan 2021 14:16:38 +0100 [thread overview]
Message-ID: <CACRpkdYHc+GFDHhherQm3+xm+akN+NdCz2hkAzLprb0PPC6CFA@mail.gmail.com> (raw)
In-Reply-To: <YAjysf3IQvxO/qsT@builder.lan>
On Thu, Jan 21, 2021 at 4:19 AM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
> On Wed 20 Jan 01:29 CST 2021, Jiapeng Zhong wrote:
>
> > 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>
>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>
> Although we're mixing bool/int on line 417 and 637 as well, with:
>
> val |= pin->disable;
>
> and
>
> pin->disable = val & BIT(0);
>
> respectively. The latter could be dealt with using !!(val & BIT(0)); I
> guess the appropriate for for the prior is:
>
> if (pin->disable)
> val |= BIT(0);
>
> If you would like to update your patch with these as well I'd be happy
> to review this.
I would opt for a respin with the above when we are anyways at it,
no hurry as it is no regression anyway.
Yours,
Linus Walleij
prev parent reply other threads:[~2021-01-22 13:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 7:29 [PATCH] pinctrl: qcom: spmi-gpio: Assign boolean values to a bool variable Jiapeng Zhong
2021-01-21 3:19 ` Bjorn Andersson
2021-01-22 13:16 ` Linus Walleij [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=CACRpkdYHc+GFDHhherQm3+xm+akN+NdCz2hkAzLprb0PPC6CFA@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=abaci-bugfix@linux.alibaba.com \
--cc=agross@kernel.org \
--cc=bjorn.andersson@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).