[U-Boot] [PATCH] GCC4.6: Squash warnings in onenand_base.c

Lukasz Majewski l.majewski at samsung.com
Thu Apr 19 14:38:37 CEST 2012


On Thu, 19 Apr 2012 13:14:17 +0200
Wolfgang Denk <wd at denx.de> wrote:

> Fix gcc 4.6 build warnings:
> onenand_base.c: In function 'onenand_probe':
> onenand_base.c:2577:6: warning: variable 'maf_id' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd at denx.de>
> Cc: Lukasz Majewski <l.majewski at samsung.com>
> Cc: Kyungmin Park <kyungmin.park at samsung.com>
> ---
>  drivers/mtd/onenand/onenand_base.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mtd/onenand/onenand_base.c
> b/drivers/mtd/onenand/onenand_base.c index 480ae7a..1d0f196 100644
> --- a/drivers/mtd/onenand/onenand_base.c
> +++ b/drivers/mtd/onenand/onenand_base.c
> @@ -2574,7 +2574,7 @@ static int onenand_chip_probe(struct mtd_info
> *mtd) int onenand_probe(struct mtd_info *mtd)
>  {
>  	struct onenand_chip *this = mtd->priv;
> -	int maf_id, dev_id, ver_id;
> +	int dev_id, ver_id;
>  	int density;
>  	int ret;
>  
> @@ -2582,8 +2582,7 @@ int onenand_probe(struct mtd_info *mtd)
>  	if (ret)
>  		return ret;
>  
> -	/* Read manufacturer and device IDs from Register */
> -	maf_id = this->read_word(this->base +
> ONENAND_REG_MANUFACTURER_ID);
> +	/* Read device IDs from Register */
>  	dev_id = this->read_word(this->base + ONENAND_REG_DEVICE_ID);
>  	ver_id = this->read_word(this->base +
> ONENAND_REG_VERSION_ID); this->technology =
> this->read_word(this->base + ONENAND_REG_TECHNOLOGY);

Tested-by: Lukasz Majewski <l.majewski at samsung.com>

Will this patch be grabbed by Wolfgang directly and applied to -rc3?

-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center
Platform Group


More information about the U-Boot mailing list