[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdYHc+GFDHhherQm3+xm+akN+NdCz2hkAzLprb0PPC6CFA@mail.gmail.com>
Date: Fri, 22 Jan 2021 14:16:38 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Bjorn Andersson <bjorn.andersson@...aro.org>
Cc: Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>,
Andy Gross <agross@...nel.org>,
MSM <linux-arm-msm@...r.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: qcom: spmi-gpio: Assign boolean values to a bool variable
On Thu, Jan 21, 2021 at 4:19 AM Bjorn Andersson
<bjorn.andersson@...aro.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@...ux.alibaba.com>
> > Signed-off-by: Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.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
Powered by blists - more mailing lists