* [PATCH -next] RDMA/hns: Remove set but not used variable 'fclr_write_fail_flag'
@ 2019-07-03 3:10 YueHaibing
0 siblings, 0 replies; 3+ messages in thread
From: YueHaibing @ 2019-07-03 3:10 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_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(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index edd62b4dc0a0..edaf900b739c 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -1132,7 +1132,6 @@ static int hns_roce_cmq_query_hw_info(struct hns_roce_dev *hr_dev)
static void hns_roce_function_clear(struct hns_roce_dev *hr_dev)
{
- bool fclr_write_fail_flag = false;
struct hns_roce_func_clear *resp;
struct hns_roce_cmq_desc desc;
unsigned long end;
@@ -1143,7 +1142,6 @@ static void hns_roce_function_clear(struct hns_roce_dev *hr_dev)
ret = hns_roce_cmq_send(hr_dev, &desc, 1);
if (ret) {
- fclr_write_fail_flag = true;
dev_err(hr_dev->dev, "Func clear write failed, ret = %d.\n",
ret);
return;
^ permalink raw reply related [flat|nested] 3+ 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
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
1 sibling, 0 replies; 3+ 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] 3+ 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
@ 2019-07-03 7:20 ` Leon Romanovsky
2019-07-03 17:54 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ 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] 3+ messages in thread
end of thread, other threads:[~2019-07-03 17:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-03 3:10 [PATCH -next] RDMA/hns: Remove set but not used variable 'fclr_write_fail_flag' YueHaibing
-- strict thread matches above, loose matches on Subject: below --
2018-09-28 10:59 [PATCH -next] RDMA/hns: remove set but not used variable 'dseg' YueHaibing
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).