[PATCH] fsl: remove redundant pointer 'priv'

Subsystems: freescale soc drivers, the rest

STALE2909d

2 messages, 2 authors, 2018-08-30 · open the first message on its own page

[PATCH] fsl: remove redundant pointer 'priv'

From: Colin King <hidden>
Date: 2018-08-29 09:28:04

From: Colin Ian King <redacted>

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

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

Signed-off-by: Colin Ian King <redacted>
---
 drivers/soc/fsl/dpio/dpio-driver.c | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/drivers/soc/fsl/dpio/dpio-driver.c b/drivers/soc/fsl/dpio/dpio-driver.c
index b60b77bfaffa..e58fcc9096e8 100644
--- a/drivers/soc/fsl/dpio/dpio-driver.c
+++ b/drivers/soc/fsl/dpio/dpio-driver.c
@@ -50,13 +50,10 @@ static void unregister_dpio_irq_handlers(struct fsl_mc_device *dpio_dev)
 
 static int register_dpio_irq_handlers(struct fsl_mc_device *dpio_dev, int cpu)
 {
-	struct dpio_priv *priv;
 	int error;
 	struct fsl_mc_device_irq *irq;
 	cpumask_t mask;
 
-	priv = dev_get_drvdata(&dpio_dev->dev);
-
 	irq = dpio_dev->irqs[0];
 	error = devm_request_irq(&dpio_dev->dev,
 				 irq->msi_desc->irq,
-- 
2.17.1

Re: [PATCH] fsl: remove redundant pointer 'priv'

From: Li Yang <hidden>
Date: 2018-08-30 17:23:32

On Wed, Aug 29, 2018 at 4:29 AM Colin King [off-list ref] wrote:
From: Colin Ian King <redacted>

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

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

Signed-off-by: Colin Ian King <redacted>
Merged for next after updated the title prefix.

Thanks!
quoted hunk
---
 drivers/soc/fsl/dpio/dpio-driver.c | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/drivers/soc/fsl/dpio/dpio-driver.c b/drivers/soc/fsl/dpio/dpio-driver.c
index b60b77bfaffa..e58fcc9096e8 100644
--- a/drivers/soc/fsl/dpio/dpio-driver.c
+++ b/drivers/soc/fsl/dpio/dpio-driver.c
@@ -50,13 +50,10 @@ static void unregister_dpio_irq_handlers(struct fsl_mc_device *dpio_dev)

 static int register_dpio_irq_handlers(struct fsl_mc_device *dpio_dev, int cpu)
 {
-       struct dpio_priv *priv;
        int error;
        struct fsl_mc_device_irq *irq;
        cpumask_t mask;

-       priv = dev_get_drvdata(&dpio_dev->dev);
-
        irq = dpio_dev->irqs[0];
        error = devm_request_irq(&dpio_dev->dev,
                                 irq->msi_desc->irq,
--
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help