From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: paulus@samba.org
Subject: Re: [PATCH 1/3] cell: fix undefined reference to mmio_nvram_init
Date: Tue, 4 Dec 2007 14:10:42 +0100 [thread overview]
Message-ID: <200712041410.43736.arnd@arndb.de> (raw)
In-Reply-To: <20071204.173453.-1300514021.kouish@swc.toshiba.co.jp>
On Tuesday 04 December 2007, Ishizaki Kou wrote:
>=20
> +#ifdef CONFIG_MMIO_NVRAM
> =A0=A0=A0=A0=A0=A0=A0=A0mmio_nvram_init();
> +#endif
> =A0}
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.
Arnd <><
next prev parent reply other threads:[~2007-12-04 13:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-04 8:34 [PATCH 1/3] cell: fix undefined reference to mmio_nvram_init Ishizaki Kou
2007-12-04 13:10 ` Arnd Bergmann [this message]
2007-12-06 6:36 ` Ishizaki Kou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200712041410.43736.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.