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 <[email protected]>
---
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
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 <[email protected]>
Reviewed-by: Andrew Jeffery <[email protected]>
> ---
> 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
>
>
>
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 <[email protected]>
>
> Reviewed-by: Andrew Jeffery <[email protected]>
Reviewed-by: Stefan Schaeckeler <[email protected]>
> > ---
> > 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
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 <[email protected]>
> >
> > Reviewed-by: Andrew Jeffery <[email protected]>
>
> Reviewed-by: Stefan Schaeckeler <[email protected]>
Applied, thanks.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.