From: cgel.zte@gmail.com
To: devesh.s.sharma@oracle.com
Cc: cgel.zte@gmail.com, chi.minghao@zte.com.cn, dledford@redhat.com,
jgg@ziepe.ca, linux-kernel@vger.kernel.org,
linux-rdma@vger.kernel.org, zealci@zte.com.cn,
zyjzyj2000@gmail.com
Subject: [PATCH for-next v2] RDMA/rxe: remove redundant err variable
Date: Wed, 15 Dec 2021 07:52:58 +0000 [thread overview]
Message-ID: <20211215075258.442930-1-chi.minghao@zte.com.cn> (raw)
In-Reply-To: <CO6PR10MB56353FD77836D5605CDDB8DEDD769@CO6PR10MB5635.namprd10.prod.outlook.com>
From: Minghao Chi <chi.minghao@zte.com.cn>
Return value directly instead of taking this
in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
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
next prev parent reply other threads:[~2021-12-15 7:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 6:06 [PATCH infiniband-next] drivers/infiniband: remove redundant err variable cgel.zte
2021-12-15 7:05 ` [External] : " Devesh Sharma
2021-12-15 7:52 ` cgel.zte [this message]
2021-12-15 8:40 ` [External] : [PATCH for-next v2] RDMA/rxe: " Devesh Sharma
2021-12-15 12:36 ` Zhu Yanjun
2022-01-05 17:54 ` Jason Gunthorpe
2021-12-16 9:03 ` [PATCH infiniband-next] drivers/infiniband: " Zhu Yanjun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211215075258.442930-1-chi.minghao@zte.com.cn \
--to=cgel.zte@gmail.com \
--cc=chi.minghao@zte.com.cn \
--cc=devesh.s.sharma@oracle.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=zealci@zte.com.cn \
--cc=zyjzyj2000@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.