Message ID | 20180702155928.6242-1-bart.vanassche@wdc.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
On Mon, Jul 02, 2018 at 08:59:28AM -0700, Bart Van Assche wrote: > Avoid that the compiler complains about set-but-not-used variables > when building with W=1. This patch does not change any functionality. > > Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> > Cc: Matan Barak <matanb@mellanox.com> > Cc: Leon Romanovsky <leonro@mellanox.com> > --- > drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 --- > drivers/infiniband/hw/mlx5/main.c | 2 -- > 2 files changed, 5 deletions(-) > Thanks, Bart. It seems like mlx5_enable_eth() in mlx5_ib_stage_roce_init() doesn't need port_num too. I'll send followup patch later on. Acked-by: Leon Romanovsky <leonro@mellanox.com> -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Jul 02, 2018 at 08:59:28AM -0700, Bart Van Assche wrote: > Avoid that the compiler complains about set-but-not-used variables > when building with W=1. This patch does not change any functionality. > > Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> > Cc: Matan Barak <matanb@mellanox.com> > Cc: Leon Romanovsky <leonro@mellanox.com> > Acked-by: Leon Romanovsky <leonro@mellanox.com> > --- > drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 --- > drivers/infiniband/hw/mlx5/main.c | 2 -- > 2 files changed, 5 deletions(-) Applied to for-next Thanks, Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 830511ac09a8..40cde6dc15d6 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -4053,15 +4053,12 @@ static void hns_roce_mhop_free_eq(struct hns_roce_dev *hr_dev, u32 bt_chk_sz; u32 mhop_num; int eqe_alloc; - int ba_num; int i = 0; int j = 0; mhop_num = hr_dev->caps.eqe_hop_num; buf_chk_sz = 1 << (hr_dev->caps.eqe_buf_pg_sz + PAGE_SHIFT); bt_chk_sz = 1 << (hr_dev->caps.eqe_ba_pg_sz + PAGE_SHIFT); - ba_num = (PAGE_ALIGN(eq->entries * eq->eqe_size) + buf_chk_sz - 1) / - buf_chk_sz; /* hop_num = 0 */ if (mhop_num == HNS_ROCE_HOP_NUM_0) { diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 5d030bc3cdd8..cdcf15c4873b 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -5792,9 +5792,7 @@ static void mlx5_ib_stage_roce_cleanup(struct mlx5_ib_dev *dev) struct mlx5_core_dev *mdev = dev->mdev; enum rdma_link_layer ll; int port_type_cap; - u8 port_num; - port_num = mlx5_core_native_port_num(dev->mdev) - 1; port_type_cap = MLX5_CAP_GEN(mdev, port_type); ll = mlx5_port_type_cap_to_rdma_ll(port_type_cap);
Avoid that the compiler complains about set-but-not-used variables when building with W=1. This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Matan Barak <matanb@mellanox.com> Cc: Leon Romanovsky <leonro@mellanox.com> --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 --- drivers/infiniband/hw/mlx5/main.c | 2 -- 2 files changed, 5 deletions(-)