kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] RDMA/hns: remove set but not used variable 'dseg'
@ 2018-09-28 10:59 YueHaibing
  2018-09-28 16:14 ` Jason Gunthorpe
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: YueHaibing @ 2018-09-28 10:59 UTC (permalink / raw)
  To: kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'hns_roce_v2_post_send':
drivers/infiniband/hw/hns/hns_roce_hw_v2.c:194:35: warning:
 variable 'dseg' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 0d7568e..8136dd8 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -191,7 +191,6 @@ static int hns_roce_v2_post_send(struct ib_qp *ibqp,
 	struct hns_roce_v2_ud_send_wqe *ud_sq_wqe;
 	struct hns_roce_v2_rc_send_wqe *rc_sq_wqe;
 	struct hns_roce_qp *qp = to_hr_qp(ibqp);
-	struct hns_roce_v2_wqe_data_seg *dseg;
 	struct device *dev = hr_dev->dev;
 	struct hns_roce_v2_db sq_db;
 	struct ib_qp_attr attr;
@@ -492,12 +491,6 @@ static int hns_roce_v2_post_send(struct ib_qp *ibqp,
 			roce_set_field(rc_sq_wqe->byte_4,
 				       V2_RC_SEND_WQE_BYTE_4_OPCODE_M,
 				       V2_RC_SEND_WQE_BYTE_4_OPCODE_S, hr_op);
-			if (wr->opcode = IB_WR_ATOMIC_CMP_AND_SWP ||
-			    wr->opcode = IB_WR_ATOMIC_FETCH_AND_ADD)
-				dseg -				  wqe - sizeof(struct hns_roce_v2_wqe_data_seg);
-			else
-				dseg = wqe;
 
 			ret = set_rwqe_data_seg(ibqp, wr, rc_sq_wqe, wqe,
 						&sge_ind, bad_wr);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH -next] RDMA/hns: remove set but not used variable 'dseg'
  2018-09-28 10:59 [PATCH -next] RDMA/hns: remove set but not used variable 'dseg' YueHaibing
@ 2018-09-28 16:14 ` Jason Gunthorpe
  2019-01-31 15:19 ` [PATCH -next] RDMA/hns: Remove set but not used variable 'rst' YueHaibing
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Jason Gunthorpe @ 2018-09-28 16:14 UTC (permalink / raw)
  To: kernel-janitors

On Fri, Sep 28, 2018 at 10:59:53AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'hns_roce_v2_post_send':
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:194:35: warning:
>  variable 'dseg' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 7 -------
>  1 file changed, 7 deletions(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH -next] RDMA/hns: Remove set but not used variable 'rst'
  2018-09-28 10:59 [PATCH -next] RDMA/hns: remove set but not used variable 'dseg' YueHaibing
  2018-09-28 16:14 ` Jason Gunthorpe
@ 2019-01-31 15:19 ` YueHaibing
  2019-01-31 22:42 ` Jason Gunthorpe
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: YueHaibing @ 2019-01-31 15:19 UTC (permalink / raw)
  To: kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'hns_roce_v2_qp_flow_control_init':
drivers/infiniband/hw/hns/hns_roce_hw_v2.c:4384:33: warning:
 variable 'rst' set but not used [-Wunused-but-set-variable]

It never used since introduction.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 5c483b437bdd..f1badcd244d1 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -4381,7 +4381,7 @@ static int hns_roce_v2_destroy_qp(struct ib_qp *ibqp)
 static int hns_roce_v2_qp_flow_control_init(struct hns_roce_dev *hr_dev,
 						struct hns_roce_qp *hr_qp)
 {
-	struct hns_roce_sccc_clr_done *rst, *resp;
+	struct hns_roce_sccc_clr_done *resp;
 	struct hns_roce_sccc_clr *clr;
 	struct hns_roce_cmq_desc desc;
 	int ret, i;
@@ -4390,7 +4390,6 @@ static int hns_roce_v2_qp_flow_control_init(struct hns_roce_dev *hr_dev,
 
 	/* set scc ctx clear done flag */
 	hns_roce_cmq_setup_basic_desc(&desc, HNS_ROCE_OPC_RESET_SCCC, false);
-	rst = (struct hns_roce_sccc_clr_done *)desc.data;
 	ret =  hns_roce_cmq_send(hr_dev, &desc, 1);
 	if (ret) {
 		dev_err(hr_dev->dev, "Reset SCC ctx  failed(%d)\n", ret);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH -next] RDMA/hns: Remove set but not used variable 'rst'
  2018-09-28 10:59 [PATCH -next] RDMA/hns: remove set but not used variable 'dseg' YueHaibing
  2018-09-28 16:14 ` Jason Gunthorpe
  2019-01-31 15:19 ` [PATCH -next] RDMA/hns: Remove set but not used variable 'rst' YueHaibing
@ 2019-01-31 22:42 ` Jason Gunthorpe
  2019-07-03  7:20 ` [PATCH -next] RDMA/hns: Remove set but not used variable 'fclr_write_fail_flag' Leon Romanovsky
  2019-07-03 17:54 ` Jason Gunthorpe
  4 siblings, 0 replies; 6+ messages in thread
From: Jason Gunthorpe @ 2019-01-31 22:42 UTC (permalink / raw)
  To: kernel-janitors

On Thu, Jan 31, 2019 at 03:19:21PM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'hns_roce_v2_qp_flow_control_init':
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:4384:33: warning:
>  variable 'rst' set but not used [-Wunused-but-set-variable]
> 
> It never used since introduction.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied to for-next

Thanks,
Jason

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH -next] RDMA/hns: Remove set but not used variable 'fclr_write_fail_flag'
  2018-09-28 10:59 [PATCH -next] RDMA/hns: remove set but not used variable 'dseg' YueHaibing
                   ` (2 preceding siblings ...)
  2019-01-31 22:42 ` Jason Gunthorpe
@ 2019-07-03  7:20 ` Leon Romanovsky
  2019-07-03 17:54 ` Jason Gunthorpe
  4 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2019-07-03  7:20 UTC (permalink / raw)
  To: kernel-janitors

On Wed, Jul 03, 2019 at 03:10:21AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'hns_roce_function_clear':
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1135:7: warning:
>  variable 'fclr_write_fail_flag' set but not used [-Wunused-but-set-variable]
>
> It is never used, so can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 --
>  1 file changed, 2 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH -next] RDMA/hns: Remove set but not used variable 'fclr_write_fail_flag'
  2018-09-28 10:59 [PATCH -next] RDMA/hns: remove set but not used variable 'dseg' YueHaibing
                   ` (3 preceding siblings ...)
  2019-07-03  7:20 ` [PATCH -next] RDMA/hns: Remove set but not used variable 'fclr_write_fail_flag' Leon Romanovsky
@ 2019-07-03 17:54 ` Jason Gunthorpe
  4 siblings, 0 replies; 6+ messages in thread
From: Jason Gunthorpe @ 2019-07-03 17:54 UTC (permalink / raw)
  To: kernel-janitors

On Wed, Jul 03, 2019 at 03:10:21AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'hns_roce_function_clear':
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1135:7: warning:
>  variable 'fclr_write_fail_flag' set but not used [-Wunused-but-set-variable]
> 
> It is never used, so can be removed.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 --
>  1 file changed, 2 deletions(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-03 17:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-28 10:59 [PATCH -next] RDMA/hns: remove set but not used variable 'dseg' YueHaibing
2018-09-28 16:14 ` Jason Gunthorpe
2019-01-31 15:19 ` [PATCH -next] RDMA/hns: Remove set but not used variable 'rst' YueHaibing
2019-01-31 22:42 ` Jason Gunthorpe
2019-07-03  7:20 ` [PATCH -next] RDMA/hns: Remove set but not used variable 'fclr_write_fail_flag' Leon Romanovsky
2019-07-03 17:54 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).