linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfc: st95hf: remove redundant pointers 'dev' and 'nfcddev'
@ 2018-07-20 18:24 Colin King
  2018-07-21  9:54 ` Daniel Mack
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-07-20 18:24 UTC (permalink / raw)
  To: Samuel Ortiz, Daniel Mack, linux-wireless; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Pointers 'dev' and 'nfcddev' are being assigned but are never used
hence they are redundant and can be removed.

Cleans up clang warnings:
warning: variable 'dev' set but not used [-Wunused-but-set-variable]
warning: variable 'nfcddev' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/nfc/st95hf/core.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/nfc/st95hf/core.c b/drivers/nfc/st95hf/core.c
index a50a95cfcfd8..36ef0e905ba3 100644
--- a/drivers/nfc/st95hf/core.c
+++ b/drivers/nfc/st95hf/core.c
@@ -781,9 +781,7 @@ static irqreturn_t st95hf_irq_thread_handler(int irq, void  *st95hfcontext)
 	int result = 0;
 	int res_len;
 	static bool wtx;
-	struct device *dev;
 	struct device *spidevice;
-	struct nfc_digital_dev *nfcddev;
 	struct sk_buff *skb_resp;
 	struct st95hf_context *stcontext  =
 		(struct st95hf_context *)st95hfcontext;
@@ -828,8 +826,6 @@ static irqreturn_t st95hf_irq_thread_handler(int irq, void  *st95hfcontext)
 		goto end;
 	}
 
-	dev = &stcontext->nfcdev->dev;
-	nfcddev = stcontext->ddev;
 	if (skb_resp->data[2] == WTX_REQ_FROM_TAG) {
 		/* Request for new FWT from tag */
 		result = st95hf_handle_wtx(stcontext, true, skb_resp->data[3]);
-- 
2.17.1

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

* Re: [PATCH] nfc: st95hf: remove redundant pointers 'dev' and 'nfcddev'
  2018-07-20 18:24 [PATCH] nfc: st95hf: remove redundant pointers 'dev' and 'nfcddev' Colin King
@ 2018-07-21  9:54 ` Daniel Mack
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Mack @ 2018-07-21  9:54 UTC (permalink / raw)
  To: Colin King, Samuel Ortiz, linux-wireless; +Cc: kernel-janitors, linux-kernel

On Friday, July 20, 2018 08:24 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointers 'dev' and 'nfcddev' are being assigned but are never used
> hence they are redundant and can be removed.
> 
> Cleans up clang warnings:
> warning: variable 'dev' set but not used [-Wunused-but-set-variable]
> warning: variable 'nfcddev' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

This seems correct.

I am currently working on a bigger series of patches for this driver 
that also touches code in the same area. I plan to post the series next 
week. If this patch is applied until then, I can rebase my changes upon 
it before sending.


Thanks,
Daniel





> ---
>   drivers/nfc/st95hf/core.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/nfc/st95hf/core.c b/drivers/nfc/st95hf/core.c
> index a50a95cfcfd8..36ef0e905ba3 100644
> --- a/drivers/nfc/st95hf/core.c
> +++ b/drivers/nfc/st95hf/core.c
> @@ -781,9 +781,7 @@ static irqreturn_t st95hf_irq_thread_handler(int irq, void  *st95hfcontext)
>   	int result = 0;
>   	int res_len;
>   	static bool wtx;
> -	struct device *dev;
>   	struct device *spidevice;
> -	struct nfc_digital_dev *nfcddev;
>   	struct sk_buff *skb_resp;
>   	struct st95hf_context *stcontext  =
>   		(struct st95hf_context *)st95hfcontext;
> @@ -828,8 +826,6 @@ static irqreturn_t st95hf_irq_thread_handler(int irq, void  *st95hfcontext)
>   		goto end;
>   	}
>   
> -	dev = &stcontext->nfcdev->dev;
> -	nfcddev = stcontext->ddev;
>   	if (skb_resp->data[2] == WTX_REQ_FROM_TAG) {
>   		/* Request for new FWT from tag */
>   		result = st95hf_handle_wtx(stcontext, true, skb_resp->data[3]);
> 

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

end of thread, other threads:[~2018-07-21 10:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20 18:24 [PATCH] nfc: st95hf: remove redundant pointers 'dev' and 'nfcddev' Colin King
2018-07-21  9:54 ` Daniel Mack

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