[-next] Input: olpc_apsp - remove set but not used variable 'np'
diff mbox series

Message ID 1542593441-169671-1-git-send-email-yuehaibing@huawei.com
State Accepted
Headers show
Series
  • [-next] Input: olpc_apsp - remove set but not used variable 'np'
Related show

Commit Message

YueHaibing Nov. 19, 2018, 2:10 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/input/serio/olpc_apsp.c: In function 'olpc_apsp_probe':
drivers/input/serio/olpc_apsp.c:192:22: warning:
 variable 'np' set but not used [-Wunused-but-set-variable]

It never used since intrdduction in commit
b56ece9a3ac3 ("Input: add OLPC AP-SP driver")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/input/serio/olpc_apsp.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Lubomir Rintel Nov. 19, 2018, 8:16 a.m. UTC | #1
On Mon, 2018-11-19 at 02:10 +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/input/serio/olpc_apsp.c: In function 'olpc_apsp_probe':
> drivers/input/serio/olpc_apsp.c:192:22: warning:
>  variable 'np' set but not used [-Wunused-but-set-variable]
> 
> It never used since intrdduction in commit
> b56ece9a3ac3 ("Input: add OLPC AP-SP driver")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Thank you.

Acked-by: Lubomir Rintel <lkundrak@v3.sk>

> ---
>  drivers/input/serio/olpc_apsp.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/input/serio/olpc_apsp.c
> b/drivers/input/serio/olpc_apsp.c
> index 91d6fb8..b360847 100644
> --- a/drivers/input/serio/olpc_apsp.c
> +++ b/drivers/input/serio/olpc_apsp.c
> @@ -189,14 +189,12 @@ static int olpc_apsp_probe(struct
> platform_device *pdev)
>  	struct serio *kb_serio, *pad_serio;
>  	struct olpc_apsp *priv;
>  	struct resource *res;
> -	struct device_node *np;
>  	int error;
>  
>  	priv = devm_kzalloc(&pdev->dev, sizeof(struct olpc_apsp),
> GFP_KERNEL);
>  	if (!priv)
>  		return -ENOMEM;
>  
> -	np = pdev->dev.of_node;
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	priv->base = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(priv->base)) {
> 
> 
>
Dmitry Torokhov Dec. 3, 2018, 7:32 p.m. UTC | #2
On Mon, Nov 19, 2018 at 02:10:41AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/input/serio/olpc_apsp.c: In function 'olpc_apsp_probe':
> drivers/input/serio/olpc_apsp.c:192:22: warning:
>  variable 'np' set but not used [-Wunused-but-set-variable]
> 
> It never used since intrdduction in commit
> b56ece9a3ac3 ("Input: add OLPC AP-SP driver")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied, thank you.

> ---
>  drivers/input/serio/olpc_apsp.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/input/serio/olpc_apsp.c b/drivers/input/serio/olpc_apsp.c
> index 91d6fb8..b360847 100644
> --- a/drivers/input/serio/olpc_apsp.c
> +++ b/drivers/input/serio/olpc_apsp.c
> @@ -189,14 +189,12 @@ static int olpc_apsp_probe(struct platform_device *pdev)
>  	struct serio *kb_serio, *pad_serio;
>  	struct olpc_apsp *priv;
>  	struct resource *res;
> -	struct device_node *np;
>  	int error;
>  
>  	priv = devm_kzalloc(&pdev->dev, sizeof(struct olpc_apsp), GFP_KERNEL);
>  	if (!priv)
>  		return -ENOMEM;
>  
> -	np = pdev->dev.of_node;
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	priv->base = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(priv->base)) {
> 
> 
>

Patch
diff mbox series

diff --git a/drivers/input/serio/olpc_apsp.c b/drivers/input/serio/olpc_apsp.c
index 91d6fb8..b360847 100644
--- a/drivers/input/serio/olpc_apsp.c
+++ b/drivers/input/serio/olpc_apsp.c
@@ -189,14 +189,12 @@  static int olpc_apsp_probe(struct platform_device *pdev)
 	struct serio *kb_serio, *pad_serio;
 	struct olpc_apsp *priv;
 	struct resource *res;
-	struct device_node *np;
 	int error;
 
 	priv = devm_kzalloc(&pdev->dev, sizeof(struct olpc_apsp), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
 
-	np = pdev->dev.of_node;
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	priv->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(priv->base)) {