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: <CAD=hENdjPT7PeMe8AoeQXQr-Ksj8S08N4xeL_=__VEsoPDeOmw@mail.gmail.com>
Date:   Wed, 15 Dec 2021 20:36:15 +0800
From:   Zhu Yanjun <zyjzyj2000@...il.com>
To:     cgel.zte@...il.com
Cc:     devesh.s.sharma@...cle.com, chi.minghao@....com.cn,
        Doug Ledford <dledford@...hat.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        LKML <linux-kernel@...r.kernel.org>,
        RDMA mailing list <linux-rdma@...r.kernel.org>,
        zealci@....com.cn
Subject: Re: [PATCH for-next v2] RDMA/rxe: remove redundant err variable

On Wed, Dec 15, 2021 at 3:53 PM <cgel.zte@...il.com> wrote:
>
> From: Minghao Chi <chi.minghao@....com.cn>
>
> Return value directly instead of taking this
> in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@....com.cn>

Thanks.
Acked-by: Zhu Yanjun <zyjzyj2000@...il.com>

Zhu Yanjun

> ---
>  drivers/infiniband/sw/rxe/rxe_net.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_net.c
> b/drivers/infiniband/sw/rxe/rxe_net.c
> index 2cb810cb890a..f557150bd59a 100644
> --- a/drivers/infiniband/sw/rxe/rxe_net.c
> +++ b/drivers/infiniband/sw/rxe/rxe_net.c
> @@ -22,24 +22,20 @@ static struct rxe_recv_sockets recv_sockets;
>
>  int rxe_mcast_add(struct rxe_dev *rxe, union ib_gid *mgid)
>  {
> -       int err;
>         unsigned char ll_addr[ETH_ALEN];
>
>         ipv6_eth_mc_map((struct in6_addr *)mgid->raw, ll_addr);
> -       err = dev_mc_add(rxe->ndev, ll_addr);
>
> -       return err;
> +       return dev_mc_add(rxe->ndev, ll_addr);
>  }
>
>  int rxe_mcast_delete(struct rxe_dev *rxe, union ib_gid *mgid)
>  {
> -       int err;
>         unsigned char ll_addr[ETH_ALEN];
>
>         ipv6_eth_mc_map((struct in6_addr *)mgid->raw, ll_addr);
> -       err = dev_mc_del(rxe->ndev, ll_addr);
>
> -       return err;
> +       return dev_mc_del(rxe->ndev, ll_addr);
>  }
>
>  static struct dst_entry *rxe_find_route4(struct net_device *ndev,
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ