[PATCH 1/4] powerpc: Add firmware_set_feature()

Arnd Bergmann arnd at arndb.de
Fri Jan 13 01:41:15 EST 2006


On Thursday 12 January 2006 07:10, Michael Ellerman wrote:
> I think we should definitely mask, we don't want to end up with imPOSSIBLE 
> features being turned on. BUG_ON might be appropriate, it would at least 
> catch people who forget to add features to the POSSIBLE map - is there any 
> way to cause it to fail at build time though?

There is BUILD_BUG_ON() that should do exactly that.

> > > -unsigned long ppc64_firmware_features;
> > > +unsigned long ppc64_firmware_features = 0;
> >
> > Kernel convention is generally not to explicitly initialize to zero.
> > Doing so forces the variable into .data rather than .bss, and therby
> > increases the vmlinux size.  I usually but a /* = 0 */ comment
> > instead.
> 
> Blergh, gcc can't work that out? I'll fix it to have the comment.

gcc version 3.3 or higher now does this itself. The conclusion on the
last kernel-janitors discussion about this topic was to stop changing
existing code for this. It's up to the code author which way to write
it. IMHO, adding the comment is the worst option, I'd just leave
the '= 0' in place.

	Arnd <><



More information about the Linuxppc64-dev mailing list