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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdk97dLyTAyt6g29HcQ-moPXqg6WpVHBwSRivDfFvSPREg@mail.gmail.com>
Date:   Tue, 11 Sep 2018 14:55:00 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Nathan Chancellor <natechancellor@...il.com>
Cc:     josh.h.morris@...ibm.com, pjk1939@...ux.vnet.ibm.com,
        axboe@...nel.dk, linux-block@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rsxx: Remove unnecessary parentheses

On Tue, Sep 11, 2018 at 2:51 PM Nathan Chancellor
<natechancellor@...il.com> wrote:
>
> Clang warns when more than one set of parentheses is used for a
> single conditional statement:
>
> drivers/block/rsxx/cregs.c:279:15: warning: equality comparison with
> extraneous parentheses [-Wparentheses-equality]
>         if ((cmd->op == CREG_OP_READ)) {
>              ~~~~~~~~^~~~~~~~~~~~~~~
> drivers/block/rsxx/cregs.c:279:15: note: remove extraneous parentheses
> around the comparison to silence this warning
>         if ((cmd->op == CREG_OP_READ)) {
>             ~        ^              ~
> drivers/block/rsxx/cregs.c:279:15: note: use '=' to turn this equality
> comparison into an assignment
>         if ((cmd->op == CREG_OP_READ)) {
>                      ^~
>                      =
> 1 warning generated.
>
> Reported-by: Nick Desaulniers <ndesaulniers@...gle.com>
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> ---
>  drivers/block/rsxx/cregs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/block/rsxx/cregs.c b/drivers/block/rsxx/cregs.c
> index c148e83e4ed7..d9a8758682c9 100644
> --- a/drivers/block/rsxx/cregs.c
> +++ b/drivers/block/rsxx/cregs.c
> @@ -276,7 +276,7 @@ static void creg_cmd_done(struct work_struct *work)
>                 st = -EIO;
>         }
>
> -       if ((cmd->op == CREG_OP_READ)) {
> +       if (cmd->op == CREG_OP_READ) {
>                 unsigned int cnt8 = ioread32(card->regmap + CREG_CNT);
>
>                 /* Paranoid Sanity Checks */
> --
> 2.18.0
>

LGTM
Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>

-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ