diff mbox

nfc: fdp: remove redundant pointer 'client'

Message ID 20180720181643.21340-1-colin.king@canonical.com (mailing list archive)
State Deferred
Delegated to: Samuel Ortiz
Headers show

Commit Message

Colin King July 20, 2018, 6:16 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Pointer 'client' is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
warning: variable 'client' set but not used [-Wunused-but-set-variable]

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

Comments

Andy Shevchenko July 23, 2018, 8:12 a.m. UTC | #1
On Fri, 2018-07-20 at 19:16 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointer 'client' is being assigned but is never used hence it is
> redundant and can be removed.
> 
> Cleans up clang warning:
> warning: variable 'client' set but not used [-Wunused-but-set-
> variable]

Oh, thanks! It seems I had missed this when did a refactoring.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/nfc/fdp/i2c.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/nfc/fdp/i2c.c b/drivers/nfc/fdp/i2c.c
> index 70a970c7375c..5d3ea63e405f 100644
> --- a/drivers/nfc/fdp/i2c.c
> +++ b/drivers/nfc/fdp/i2c.c
> @@ -210,7 +210,6 @@ static int fdp_nci_i2c_read(struct fdp_i2c_phy
> *phy, struct sk_buff **skb)
>  static irqreturn_t fdp_nci_i2c_irq_thread_fn(int irq, void *phy_id)
>  {
>  	struct fdp_i2c_phy *phy = phy_id;
> -	struct i2c_client *client;
>  	struct sk_buff *skb;
>  	int r;
>  
> @@ -219,8 +218,6 @@ static irqreturn_t fdp_nci_i2c_irq_thread_fn(int
> irq, void *phy_id)
>  		return IRQ_NONE;
>  	}
>  
> -	client = phy->i2c_dev;
> -
>  	r = fdp_nci_i2c_read(phy, &skb);
>  
>  	if (r == -EREMOTEIO)
diff mbox

Patch

diff --git a/drivers/nfc/fdp/i2c.c b/drivers/nfc/fdp/i2c.c
index 70a970c7375c..5d3ea63e405f 100644
--- a/drivers/nfc/fdp/i2c.c
+++ b/drivers/nfc/fdp/i2c.c
@@ -210,7 +210,6 @@  static int fdp_nci_i2c_read(struct fdp_i2c_phy *phy, struct sk_buff **skb)
 static irqreturn_t fdp_nci_i2c_irq_thread_fn(int irq, void *phy_id)
 {
 	struct fdp_i2c_phy *phy = phy_id;
-	struct i2c_client *client;
 	struct sk_buff *skb;
 	int r;
 
@@ -219,8 +218,6 @@  static irqreturn_t fdp_nci_i2c_irq_thread_fn(int irq, void *phy_id)
 		return IRQ_NONE;
 	}
 
-	client = phy->i2c_dev;
-
 	r = fdp_nci_i2c_read(phy, &skb);
 
 	if (r == -EREMOTEIO)