Message ID | 1545357957-67309-1-git-send-email-yuehaibing@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | e7c4d8e6045171896d763c551b90c672fb5ab42b |
Delegated to: | Jason Gunthorpe |
Headers | show |
Series | [-next] IB/mlx4: Remove set but not used variable 'pd' | expand |
On Fri, Dec 21, 2018 at 02:05:57AM +0000, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/infiniband/hw/mlx4/qp.c: In function '_mlx4_ib_destroy_qp': > drivers/infiniband/hw/mlx4/qp.c:1612:22: warning: > variable 'pd' set but not used [-Wunused-but-set-variable] > > It not used since commit e00b64f7c54c ("RDMA: Cleanup undesired > pd->uobject usage") > > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > --- > drivers/infiniband/hw/mlx4/qp.c | 3 --- > 1 file changed, 3 deletions(-) I wonder why my compiler didn't flag this.. Applied to for-next, thanks Jason
On 2018/12/21 11:48, Jason Gunthorpe wrote: > On Fri, Dec 21, 2018 at 02:05:57AM +0000, YueHaibing wrote: >> Fixes gcc '-Wunused-but-set-variable' warning: >> >> drivers/infiniband/hw/mlx4/qp.c: In function '_mlx4_ib_destroy_qp': >> drivers/infiniband/hw/mlx4/qp.c:1612:22: warning: >> variable 'pd' set but not used [-Wunused-but-set-variable] >> >> It not used since commit e00b64f7c54c ("RDMA: Cleanup undesired >> pd->uobject usage") >> >> Signed-off-by: YueHaibing <yuehaibing@huawei.com> >> --- >> drivers/infiniband/hw/mlx4/qp.c | 3 --- >> 1 file changed, 3 deletions(-) > > I wonder why my compiler didn't flag this.. just use make W=1 > > Applied to for-next, thanks > > Jason > >
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 24ee30f..971e9a9 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -1609,9 +1609,6 @@ static int _mlx4_ib_destroy_qp(struct ib_qp *qp) if (qp->rwq_ind_tbl) { destroy_qp_rss(dev, mqp); } else { - struct mlx4_ib_pd *pd; - - pd = get_pd(mqp); destroy_qp_common(dev, mqp, MLX4_IB_QP_SRC, qp->uobject); }
Fixes gcc '-Wunused-but-set-variable' warning: drivers/infiniband/hw/mlx4/qp.c: In function '_mlx4_ib_destroy_qp': drivers/infiniband/hw/mlx4/qp.c:1612:22: warning: variable 'pd' set but not used [-Wunused-but-set-variable] It not used since commit e00b64f7c54c ("RDMA: Cleanup undesired pd->uobject usage") Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- drivers/infiniband/hw/mlx4/qp.c | 3 --- 1 file changed, 3 deletions(-)