lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ