linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] RDMA/hns: remove set but not used variable 'irq_num'
@ 2019-07-31  7:37 YueHaibing
  2019-08-01 10:10 ` Leon Romanovsky
  0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2019-07-31  7:37 UTC (permalink / raw)
  To: oulijun, xavier.huwei, dledford, jgg; +Cc: linux-kernel, linux-rdma, YueHaibing

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

drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function hns_roce_v2_cleanup_eq_table:
drivers/infiniband/hw/hns/hns_roce_hw_v2.c:5920:6:
 warning: variable irq_num set but not used [-Wunused-but-set-variable]

It is not used since
commit 33db6f94847c ("RDMA/hns: Refactor eq table init for hip08")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 --
 1 file changed, 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 83c58be..59f88bf0 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -5917,12 +5917,10 @@ static int hns_roce_v2_init_eq_table(struct hns_roce_dev *hr_dev)
 static void hns_roce_v2_cleanup_eq_table(struct hns_roce_dev *hr_dev)
 {
 	struct hns_roce_eq_table *eq_table = &hr_dev->eq_table;
-	int irq_num;
 	int eq_num;
 	int i;
 
 	eq_num = hr_dev->caps.num_comp_vectors + hr_dev->caps.num_aeq_vectors;
-	irq_num = eq_num + hr_dev->caps.num_other_vectors;
 
 	/* Disable irq */
 	hns_roce_v2_int_mask_enable(hr_dev, eq_num, EQ_DISABLE);
-- 
2.7.4



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

* Re: [PATCH -next] RDMA/hns: remove set but not used variable 'irq_num'
  2019-07-31  7:37 [PATCH -next] RDMA/hns: remove set but not used variable 'irq_num' YueHaibing
@ 2019-08-01 10:10 ` Leon Romanovsky
  2019-08-01 15:47   ` Doug Ledford
  0 siblings, 1 reply; 3+ messages in thread
From: Leon Romanovsky @ 2019-08-01 10:10 UTC (permalink / raw)
  To: YueHaibing; +Cc: oulijun, xavier.huwei, dledford, jgg, linux-kernel, linux-rdma

On Wed, Jul 31, 2019 at 03:37:48PM +0800, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function hns_roce_v2_cleanup_eq_table:
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:5920:6:
>  warning: variable irq_num set but not used [-Wunused-but-set-variable]
>
> It is not used since
> commit 33db6f94847c ("RDMA/hns: Refactor eq table init for hip08")
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 --
>  1 file changed, 2 deletions(-)
>

I'm hitting this error too.

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

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

* Re: [PATCH -next] RDMA/hns: remove set but not used variable 'irq_num'
  2019-08-01 10:10 ` Leon Romanovsky
@ 2019-08-01 15:47   ` Doug Ledford
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2019-08-01 15:47 UTC (permalink / raw)
  To: Leon Romanovsky, YueHaibing
  Cc: oulijun, xavier.huwei, jgg, linux-kernel, linux-rdma

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

On Thu, 2019-08-01 at 13:10 +0300, Leon Romanovsky wrote:
> On Wed, Jul 31, 2019 at 03:37:48PM +0800, YueHaibing wrote:
> > Fixes gcc '-Wunused-but-set-variable' warning:
> > 
> > drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function
> > hns_roce_v2_cleanup_eq_table:
> > drivers/infiniband/hw/hns/hns_roce_hw_v2.c:5920:6:
> >  warning: variable irq_num set but not used [-Wunused-but-set-
> > variable]
> > 
> > It is not used since
> > commit 33db6f94847c ("RDMA/hns: Refactor eq table init for hip08")
> > 
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > ---
> >  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> 
> I'm hitting this error too.
> 
> Thanks,
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>

Applied to for-next, thanks.

-- 
Doug Ledford <dledford@redhat.com>
    GPG KeyID: B826A3330E572FDD
    Fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2019-08-01 15:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31  7:37 [PATCH -next] RDMA/hns: remove set but not used variable 'irq_num' YueHaibing
2019-08-01 10:10 ` Leon Romanovsky
2019-08-01 15:47   ` Doug Ledford

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).