Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH -next] EDAC: aspeed: Remove set but not used variable 'np'
@ 2019-05-25 14:41 YueHaibing
  2019-05-29  1:27 ` Andrew Jeffery
  0 siblings, 1 reply; 4+ messages in thread
From: YueHaibing @ 2019-05-25 14:41 UTC (permalink / raw)
  To: sschaeck, bp, mchehab, james.morse, joel, andrew
  Cc: linux-kernel, linux-aspeed, linux-edac, linux-arm-kernel, YueHaibing

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/edac/aspeed_edac.c: In function aspeed_probe:
drivers/edac/aspeed_edac.c:284:22: warning: variable np set but not used [-Wunused-but-set-variable]

It is never used and can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/edac/aspeed_edac.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
index 11833c0a5d07..5634437bb39d 100644
--- a/drivers/edac/aspeed_edac.c
+++ b/drivers/edac/aspeed_edac.c
@@ -281,15 +281,11 @@ static int aspeed_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct edac_mc_layer layers[2];
 	struct mem_ctl_info *mci;
-	struct device_node *np;
 	struct resource *res;
 	void __iomem *regs;
 	u32 reg04;
 	int rc;
 
-	/* setup regmap */
-	np = dev->of_node;
-
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res)
 		return -ENOENT;
-- 
2.17.1



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

* Re: [PATCH -next] EDAC: aspeed: Remove set but not used variable 'np'
  2019-05-25 14:41 [PATCH -next] EDAC: aspeed: Remove set but not used variable 'np' YueHaibing
@ 2019-05-29  1:27 ` Andrew Jeffery
  2019-05-29  3:10   ` Stefan Schaeckeler (sschaeck)
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Jeffery @ 2019-05-29  1:27 UTC (permalink / raw)
  To: YueHaibing, Stefan M Schaeckeler, Borislav Petkov,
	Mauro Carvalho Chehab, james.morse, Joel Stanley
  Cc: linux-kernel, linux-aspeed, linux-edac, linux-arm-kernel



On Sun, 26 May 2019, at 00:12, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/edac/aspeed_edac.c: In function aspeed_probe:
> drivers/edac/aspeed_edac.c:284:22: warning: variable np set but not 
> used [-Wunused-but-set-variable]
> 
> It is never used and can be removed.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Andrew Jeffery <andrew@aj.id.au>

> ---
>  drivers/edac/aspeed_edac.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
> index 11833c0a5d07..5634437bb39d 100644
> --- a/drivers/edac/aspeed_edac.c
> +++ b/drivers/edac/aspeed_edac.c
> @@ -281,15 +281,11 @@ static int aspeed_probe(struct platform_device *pdev)
>  	struct device *dev = &pdev->dev;
>  	struct edac_mc_layer layers[2];
>  	struct mem_ctl_info *mci;
> -	struct device_node *np;
>  	struct resource *res;
>  	void __iomem *regs;
>  	u32 reg04;
>  	int rc;
>  
> -	/* setup regmap */
> -	np = dev->of_node;
> -
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	if (!res)
>  		return -ENOENT;
> -- 
> 2.17.1
> 
> 
>

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

* Re: [PATCH -next] EDAC: aspeed: Remove set but not used variable 'np'
  2019-05-29  1:27 ` Andrew Jeffery
@ 2019-05-29  3:10   ` Stefan Schaeckeler (sschaeck)
  2019-06-11 13:12     ` Borislav Petkov
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Schaeckeler (sschaeck) @ 2019-05-29  3:10 UTC (permalink / raw)
  To: Andrew Jeffery, YueHaibing, Borislav Petkov,
	Mauro Carvalho Chehab, james.morse, Joel Stanley
  Cc: linux-kernel, linux-aspeed, linux-edac, linux-arm-kernel

On  Tuesday, May 28, 2019 at 6:27 PM, Andrew Jeffery wrote:
> On Sun, 26 May 2019, at 00:12, YueHaibing wrote:
> > Fixes gcc '-Wunused-but-set-variable' warning:
> >
> > drivers/edac/aspeed_edac.c: In function aspeed_probe:
> > drivers/edac/aspeed_edac.c:284:22: warning: variable np set but not
> > used [-Wunused-but-set-variable]
> >
> > It is never used and can be removed.
> >
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>
> Reviewed-by: Andrew Jeffery <andrew@aj.id.au>

Reviewed-by: Stefan Schaeckeler <sschaeck@cisco.com>

> > ---
> >  drivers/edac/aspeed_edac.c | 4 ----
> >  1 file changed, 4 deletions(-)
> >
> > diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
> > index 11833c0a5d07..5634437bb39d 100644
> > --- a/drivers/edac/aspeed_edac.c
> > +++ b/drivers/edac/aspeed_edac.c
> > @@ -281,15 +281,11 @@ static int aspeed_probe(struct platform_device *pdev)
> >  	struct device *dev = &pdev->dev;
> >  	struct edac_mc_layer layers[2];
> >  	struct mem_ctl_info *mci;
> > -	struct device_node *np;
> >  	struct resource *res;
> >  	void __iomem *regs;
> >  	u32 reg04;
> > 	int rc;
> >
> > -	/* setup regmap */
> > -	np = dev->of_node;
> > -
> >  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >  	if (!res)
> >  		return -ENOENT;
> > --
> > 2.17.1


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

* Re: [PATCH -next] EDAC: aspeed: Remove set but not used variable 'np'
  2019-05-29  3:10   ` Stefan Schaeckeler (sschaeck)
@ 2019-06-11 13:12     ` Borislav Petkov
  0 siblings, 0 replies; 4+ messages in thread
From: Borislav Petkov @ 2019-06-11 13:12 UTC (permalink / raw)
  To: Stefan Schaeckeler (sschaeck)
  Cc: Andrew Jeffery, YueHaibing, Mauro Carvalho Chehab, james.morse,
	Joel Stanley, linux-kernel, linux-aspeed, linux-edac,
	linux-arm-kernel

On Wed, May 29, 2019 at 03:10:54AM +0000, Stefan Schaeckeler (sschaeck) wrote:
> On  Tuesday, May 28, 2019 at 6:27 PM, Andrew Jeffery wrote:
> > On Sun, 26 May 2019, at 00:12, YueHaibing wrote:
> > > Fixes gcc '-Wunused-but-set-variable' warning:
> > >
> > > drivers/edac/aspeed_edac.c: In function aspeed_probe:
> > > drivers/edac/aspeed_edac.c:284:22: warning: variable np set but not
> > > used [-Wunused-but-set-variable]
> > >
> > > It is never used and can be removed.
> > >
> > > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> >
> > Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> 
> Reviewed-by: Stefan Schaeckeler <sschaeck@cisco.com>

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-25 14:41 [PATCH -next] EDAC: aspeed: Remove set but not used variable 'np' YueHaibing
2019-05-29  1:27 ` Andrew Jeffery
2019-05-29  3:10   ` Stefan Schaeckeler (sschaeck)
2019-06-11 13:12     ` Borislav Petkov

Linux-EDAC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \
		linux-edac@vger.kernel.org linux-edac@archiver.kernel.org
	public-inbox-index linux-edac


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac


AGPL code for this site: git clone https://public-inbox.org/ public-inbox