[PATCH 9/12] powerpc: Export htab start/end via device tree

Michael Ellerman michael at ellerman.id.au
Tue Nov 8 10:32:26 EST 2005


On Tue, 8 Nov 2005 00:15, Dave Hansen wrote:
> On Tue, 2005-11-08 at 00:07 +1100, Michael Ellerman wrote:
> > +#ifdef CONFIG_KEXEC
> > +       kexec_setup();  /* requires unflattened device tree. */
> > +#endif
>
> Would this #ifdef be more appropriate in the header where this
> function's prototype currently resides?

Do you mean something like this in kexec.h?

#ifdef CONFIG_KEXEC
extern void kexec_setup();
#else
void kexec_setup(void) { }
#endif

If so I prefer having the ifdef around the actually call-site, because that 
makes it clear to someone reading that code that we only call kexec_setup() 
when CONFIG_KEXEC is true. With the second method they have to open kexec.h 
and notice that with CONFIG_KEXEC=n kexec_setup() is a no-op.

cheers

-- 
Michael Ellerman
IBM OzLabs

email: michael:ellerman.id.au
inmsg: mpe:jabber.org
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20051108/6439df89/attachment.pgp 


More information about the Linuxppc64-dev mailing list