linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ehea: remove set but not used variables 'epa' and 'cq_handle_ref'
@ 2019-04-03  7:52 Yue Haibing
  2019-04-04  7:28 ` Mukesh Ojha
  2019-04-05  0:37 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Yue Haibing @ 2019-04-03  7:52 UTC (permalink / raw)
  To: davem, dougmill; +Cc: linux-kernel, netdev, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

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

drivers/net/ethernet/ibm/ehea/ehea_qmr.c: In function 'ehea_create_cq':
drivers/net/ethernet/ibm/ehea/ehea_qmr.c:127:7: warning: variable 'cq_handle_ref' set but not used [-Wunused-but-set-variable]
drivers/net/ethernet/ibm/ehea/ehea_qmr.c:126:15: warning: variable 'epa' set but not used [-Wunused-but-set-variable]

They are never used since commit
7a291083225a ("[PATCH] ehea: IBM eHEA Ethernet Device Driver")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/ibm/ehea/ehea_qmr.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
index 5e4e371..77ce173 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
@@ -123,8 +123,7 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
 			       int nr_of_cqe, u64 eq_handle, u32 cq_token)
 {
 	struct ehea_cq *cq;
-	struct h_epa epa;
-	u64 *cq_handle_ref, hret, rpage;
+	u64 hret, rpage;
 	u32 counter;
 	int ret;
 	void *vpage;
@@ -139,8 +138,6 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
 
 	cq->adapter = adapter;
 
-	cq_handle_ref = &cq->fw_handle;
-
 	hret = ehea_h_alloc_resource_cq(adapter->handle, &cq->attr,
 					&cq->fw_handle, &cq->epas);
 	if (hret != H_SUCCESS) {
@@ -188,7 +185,6 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
 	}
 
 	hw_qeit_reset(&cq->hw_queue);
-	epa = cq->epas.kernel;
 	ehea_reset_cq_ep(cq);
 	ehea_reset_cq_n1(cq);
 
-- 
2.7.0



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

* Re: [PATCH -next] ehea: remove set but not used variables 'epa' and 'cq_handle_ref'
  2019-04-03  7:52 [PATCH -next] ehea: remove set but not used variables 'epa' and 'cq_handle_ref' Yue Haibing
@ 2019-04-04  7:28 ` Mukesh Ojha
  2019-04-05  0:37 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Mukesh Ojha @ 2019-04-04  7:28 UTC (permalink / raw)
  To: Yue Haibing, davem, dougmill; +Cc: linux-kernel, netdev


On 4/3/2019 1:22 PM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/ibm/ehea/ehea_qmr.c: In function 'ehea_create_cq':
> drivers/net/ethernet/ibm/ehea/ehea_qmr.c:127:7: warning: variable 'cq_handle_ref' set but not used [-Wunused-but-set-variable]
> drivers/net/ethernet/ibm/ehea/ehea_qmr.c:126:15: warning: variable 'epa' set but not used [-Wunused-but-set-variable]
>
> They are never used since commit
> 7a291083225a ("[PATCH] ehea: IBM eHEA Ethernet Device Driver")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh
> ---
>   drivers/net/ethernet/ibm/ehea/ehea_qmr.c | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
> index 5e4e371..77ce173 100644
> --- a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
> +++ b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
> @@ -123,8 +123,7 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
>   			       int nr_of_cqe, u64 eq_handle, u32 cq_token)
>   {
>   	struct ehea_cq *cq;
> -	struct h_epa epa;
> -	u64 *cq_handle_ref, hret, rpage;
> +	u64 hret, rpage;
>   	u32 counter;
>   	int ret;
>   	void *vpage;
> @@ -139,8 +138,6 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
>   
>   	cq->adapter = adapter;
>   
> -	cq_handle_ref = &cq->fw_handle;
> -
>   	hret = ehea_h_alloc_resource_cq(adapter->handle, &cq->attr,
>   					&cq->fw_handle, &cq->epas);
>   	if (hret != H_SUCCESS) {
> @@ -188,7 +185,6 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
>   	}
>   
>   	hw_qeit_reset(&cq->hw_queue);
> -	epa = cq->epas.kernel;
>   	ehea_reset_cq_ep(cq);
>   	ehea_reset_cq_n1(cq);
>   

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

* Re: [PATCH -next] ehea: remove set but not used variables 'epa' and 'cq_handle_ref'
  2019-04-03  7:52 [PATCH -next] ehea: remove set but not used variables 'epa' and 'cq_handle_ref' Yue Haibing
  2019-04-04  7:28 ` Mukesh Ojha
@ 2019-04-05  0:37 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-04-05  0:37 UTC (permalink / raw)
  To: yuehaibing; +Cc: dougmill, linux-kernel, netdev

From: Yue Haibing <yuehaibing@huawei.com>
Date: Wed, 3 Apr 2019 15:52:08 +0800

> From: YueHaibing <yuehaibing@huawei.com>
> 
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/ethernet/ibm/ehea/ehea_qmr.c: In function 'ehea_create_cq':
> drivers/net/ethernet/ibm/ehea/ehea_qmr.c:127:7: warning: variable 'cq_handle_ref' set but not used [-Wunused-but-set-variable]
> drivers/net/ethernet/ibm/ehea/ehea_qmr.c:126:15: warning: variable 'epa' set but not used [-Wunused-but-set-variable]
> 
> They are never used since commit
> 7a291083225a ("[PATCH] ehea: IBM eHEA Ethernet Device Driver")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied.

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

end of thread, other threads:[~2019-04-05  0:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03  7:52 [PATCH -next] ehea: remove set but not used variables 'epa' and 'cq_handle_ref' Yue Haibing
2019-04-04  7:28 ` Mukesh Ojha
2019-04-05  0:37 ` David Miller

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