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

Paul Mackerras paulus at samba.org
Thu Jan 12 20:29:01 EST 2006


Michael Ellerman writes:

> We have firmware_has_feature() to test for features, add firmware_set_feature()
> so that no one needs to touch ppc64_firmware_features directly.

Because they might get their fingers dirty? :)

Seriously, I don't think firmware_set_feature is really a help.  To me
it's easier to understand what ppc64_firmware_features = xxx does than
to understand firmware_set_feature(xxx) does, because with the latter
I have to go off and look for the definition of firmware_set_feature.
And while I am finding it I'll be wondering whether it actually does a
firmware call or something, or if it does some extra checking, or if I
can only call it for one feature at a time (it is firmware_set_feature
not firmware_set_features, after all).

Also, uninitialized variables (outside of procedures) are always set
to 0.  This is required by the C standard.  If you add the = 0 then
some janitor or other will just come along and remove it again. :)

Paul.



More information about the Linuxppc64-dev mailing list