linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: omap1: add nand_chip declaration
@ 2018-09-26 13:04 Arnd Bergmann
  2018-09-26 13:23 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2018-09-26 13:04 UTC (permalink / raw)
  To: Boris Brezillon, Miquel Raynal, linux-mtd
  Cc: Arnd Bergmann, Aaro Koskinen, Tony Lindgren, Alexander Sverdlin,
	linux-omap, linux-arm-kernel, linux-kernel

Recent MTD changes caused a minor build regression on OMAP1:

In file included from arch/arm/mach-omap1/devices.c:31:
arch/arm/mach-omap1/common.h:85:39: error: 'struct nand_chip' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]

Fixes: 1002aed789bc ("mtd: rawnand: plat_nand: Pass a nand_chip object to all platform_nand_ctrl hooks")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap1/common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h
index 11b87a4c84d4..82f2c065040a 100644
--- a/arch/arm/mach-omap1/common.h
+++ b/arch/arm/mach-omap1/common.h
@@ -82,6 +82,7 @@ void omap1_restart(enum reboot_mode, const char *);
 
 extern void __init omap_check_revision(void);
 
+struct nand_chip;
 extern void omap1_nand_cmd_ctl(struct nand_chip *this, int cmd,
 			       unsigned int ctrl);
 
-- 
2.18.0

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

* Re: [PATCH 1/2] ARM: omap1: add nand_chip declaration
  2018-09-26 13:04 [PATCH 1/2] ARM: omap1: add nand_chip declaration Arnd Bergmann
@ 2018-09-26 13:23 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2018-09-26 13:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Boris Brezillon, linux-mtd, Aaro Koskinen, Tony Lindgren,
	Alexander Sverdlin, linux-omap, linux-arm-kernel, linux-kernel

Hi Arnd,

Thanks for the fix, sorry for breaking the build.

Arnd Bergmann <arnd@arndb.de> wrote on Wed, 26 Sep 2018 15:04:38 +0200:

> Recent MTD changes caused a minor build regression on OMAP1:
> 
> In file included from arch/arm/mach-omap1/devices.c:31:
> arch/arm/mach-omap1/common.h:85:39: error: 'struct nand_chip' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
> 
> Fixes: 1002aed789bc ("mtd: rawnand: plat_nand: Pass a nand_chip object to all platform_nand_ctrl hooks")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-omap1/common.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h
> index 11b87a4c84d4..82f2c065040a 100644
> --- a/arch/arm/mach-omap1/common.h
> +++ b/arch/arm/mach-omap1/common.h
> @@ -82,6 +82,7 @@ void omap1_restart(enum reboot_mode, const char *);
>  
>  extern void __init omap_check_revision(void);
>  
> +struct nand_chip;
>  extern void omap1_nand_cmd_ctl(struct nand_chip *this, int cmd,
>  			       unsigned int ctrl);
>  

Currently I see "#include <linux/mtd/mtd.h>" at the top of this file.
That's where the "struct mtd_info" that has been replaced by a "struct
nand_chip" was declared. The nand_chip object is declared in
<linux/mtd/rawnand.h>.

I think you can remove this include (unneeded anymore for what I see).
Then, either you keep the nand_chip forward declaration, or replace the
mtd.h include into the rawnand.h one?


Thanks,
Miquèl

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

end of thread, other threads:[~2018-09-26 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-26 13:04 [PATCH 1/2] ARM: omap1: add nand_chip declaration Arnd Bergmann
2018-09-26 13:23 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).