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]
Date:   Sun, 19 Feb 2017 17:12:00 +0000
From:   Majd Dibbiny <majd@...lanox.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
CC:     "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        Doug Ledford <dledford@...hat.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        "Leon Romanovsky" <leonro@...lanox.com>,
        Matan Barak <matanb@...lanox.com>,
        "Sean Hefty" <sean.hefty@...el.com>,
        Yishai Hadas <yishaih@...lanox.com>,
        LKML <linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH 09/29] IB/mlx4: Move an assignment out of a check in
 forward_trap()


> On Feb 18, 2017, at 10:58 PM, SF Markus Elfring <elfring@...rs.sourceforge.net> wrote:
> 
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Fri, 17 Feb 2017 22:22:53 +0100
> 
> The script "checkpatch.pl" pointed information out like the following.
> 
> ERROR: do not use assignment in if condition
> 
> Thus fix the affected source code place.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
> drivers/infiniband/hw/mlx4/mad.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
> index 9518b7244269..860fec8b9601 100644
> --- a/drivers/infiniband/hw/mlx4/mad.c
> +++ b/drivers/infiniband/hw/mlx4/mad.c
> @@ -401,7 +401,8 @@ static void forward_trap(struct mlx4_ib_dev *dev, u8 port_num, const struct ib_m
>         */
>        spin_lock_irqsave(&dev->sm_lock, flags);
>        memcpy(send_buf->mad, mad, sizeof *mad);
> -        if ((send_buf->ah = dev->sm_ah[port_num - 1]))
> +        send_buf->ah = dev->sm_ah[port_num - 1];
> +        if (send_buf->ah)
>            ret = ib_post_send_mad(send_buf, NULL);
>        else
>            ret = -EINVAL;
> -- 
> 2.11.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thanks,
Reviewed-by: Majd Dibbiny
<majd@...lanox.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ