linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Ojha <mojha@codeaurora.org>
To: Yue Haibing <yuehaibing@huawei.com>,
	davem@davemloft.net, dougmill@linux.ibm.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH -next] ehea: remove set but not used variables 'epa' and 'cq_handle_ref'
Date: Thu, 4 Apr 2019 12:58:00 +0530	[thread overview]
Message-ID: <1fd03d2c-001b-89d4-eeb1-9666ac8b6d8d@codeaurora.org> (raw)
In-Reply-To: <20190403075208.30000-1-yuehaibing@huawei.com>


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

  reply	other threads:[~2019-04-04  7:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-04-05  0:37 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1fd03d2c-001b-89d4-eeb1-9666ac8b6d8d@codeaurora.org \
    --to=mojha@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=dougmill@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).