[PATCH 1/3] cell: fix undefined reference to mmio_nvram_init

Ishizaki Kou kou.ishizaki at toshiba.co.jp
Thu Dec 6 17:36:27 EST 2007


Arnd Bergmann <arnd at arndb.de> wrote:
> On Tuesday 04 December 2007, Ishizaki Kou wrote:
> > 
> > +#ifdef CONFIG_MMIO_NVRAM
> > 	mmio_nvram_init();
> > +#endif
> >  }
> 
> The patch is technically correct, but the preferred way of doing this is
> to define a conditional inline function in the header, like:
> 
> #ifdef CONFIG_MMIO_NVRAM
> extern int mmio_nvram_init(void);
> #else
> static inline int mmio_nvram_init(void)
> {
> 	return 0;
> }
> #endif
> 
> so that the caller does not need to know about it.

Okay, I'll change my patch to rewrite include/asm-powerpc/nvram.h.

Best regards,
Kou Ishizaki



More information about the Linuxppc-dev mailing list