Re: [PATCH] mtd: onenand: fix parameter list build warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Randy,

Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote on Mon, 3 Sep 2018 12:32:04
-0700:

> From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> 
> Fix build warning in <linux/mtd/onenand.h> by adding a "stub" struct
> for mtd_oob_ops:
> 
> include/linux/mtd/onenand.h: warning: 'struct mtd_oob_ops' declared inside parameter list [enabled by default]
> include/linux/mtd/onenand.h: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
> 
> Fixes: 607d1cb10426 ("[MTD] [OneNAND] proper onenand_bbt_read_oob() prototype")
> 
> Reported-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Cc: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
> Cc: linux-mtd@xxxxxxxxxxxxxxxxxxx
> Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
> Cc: Brian Norris <computersforpeace@xxxxxxxxx>
> Cc: Boris Brezillon <boris.brezillon@xxxxxxxxxxx>
> Cc: Marek Vasut <marek.vasut@xxxxxxxxx>
> Cc: Richard Weinberger <richard@xxxxxx>
> Cc: Adrian Bunk <bunk@xxxxxxxxxx>
> Cc: Adrian Bunk <bunk@xxxxxxxxxx>
> ---
>  include/linux/mtd/onenand.h |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- lnx-419-rc2.orig/include/linux/mtd/onenand.h
> +++ lnx-419-rc2/include/linux/mtd/onenand.h
> @@ -221,6 +221,7 @@ struct onenand_manufacturers {
>          char *name;
>  };
>  
> +struct mtd_oob_ops;
>  int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from,
>  			 struct mtd_oob_ops *ops);
>  unsigned onenand_block(struct onenand_chip *this, loff_t addr);

That's indeed a working solution, but there are a lot of other
structures in this file that come (like mtd_oob_ops) from
linux/mtd/mtd.h so I wonder if it would not make more sense to include
this header here?

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux