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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 17 Feb 2017 10:55:44 -0500 (EST) From: Laurence Oberman <loberman@...hat.com> To: Colin King <colin.king@...onical.com> Cc: Selvin Xavier <selvin.xavier@...adcom.com>, Devesh Sharma <devesh.sharma@...adcom.com>, Somnath Kotur <somnath.kotur@...adcom.com>, Sriharsha Basavapatna <sriharsha.basavapatna@...adcom.com>, Doug Ledford <dledford@...hat.com>, Sean Hefty <sean.hefty@...el.com>, Hal Rosenstock <hal.rosenstock@...il.com>, linux-rdma@...r.kernel.org, kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH] RDMA/bnxt_re: remove redundant initialization of rc to zero ----- Original Message ----- > From: "Colin King" <colin.king@...onical.com> > To: "Selvin Xavier" <selvin.xavier@...adcom.com>, "Devesh Sharma" <devesh.sharma@...adcom.com>, "Somnath Kotur" > <somnath.kotur@...adcom.com>, "Sriharsha Basavapatna" <sriharsha.basavapatna@...adcom.com>, "Doug Ledford" > <dledford@...hat.com>, "Sean Hefty" <sean.hefty@...el.com>, "Hal Rosenstock" <hal.rosenstock@...il.com>, > linux-rdma@...r.kernel.org > Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org > Sent: Friday, February 17, 2017 10:35:22 AM > Subject: [PATCH] RDMA/bnxt_re: remove redundant initialization of rc to zero > > From: Colin Ian King <colin.king@...onical.com> > > rc is initialized to zero but is then updated by calls to > bnxt_qplib_free_fast_reg_page_list and/or bnxt_qpliob_free_mrw > so the initialization is redundant and can be removed. > > Detected with CoverityScan, CID#1408448 ("Unused Value") > > Signed-off-by: Colin Ian King <colin.king@...onical.com> > --- > drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c > b/drivers/infiniband/hw/bnxt_re/ib_verbs.c > index 33af2e3..17aa087 100644 > --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c > +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c > @@ -2818,7 +2818,7 @@ int bnxt_re_dereg_mr(struct ib_mr *ib_mr) > { > struct bnxt_re_mr *mr = container_of(ib_mr, struct bnxt_re_mr, ib_mr); > struct bnxt_re_dev *rdev = mr->rdev; > - int rc = 0; > + int rc; > > if (mr->npages && mr->pages) { > rc = bnxt_qplib_free_fast_reg_page_list(&rdev->qplib_res, > -- > 2.10.2 > > -- > 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 > Makes sense, looks fine. Reviewed-by: Laurence Oberman <loberman@...hat.com>
Powered by blists - more mailing lists