Re: [ACPI] Re: [PATCH] cleanup ACPI numa warnings

From: Martin J. Bligh
Date: Tue Aug 10 2004 - 16:45:07 EST


--"Randy.Dunlap" <rddunlap@xxxxxxxx> wrote (on Sunday, August 08, 2004 14:36:31 -0700):

> On Sat, 7 Aug 2004 10:57:29 -0700 Paul Jackson wrote:
>
>| > And there's nothing in CodingStyle that agrees with you that I could find.
>|
>| > From the file Documentation/SubmittingPatches:
>|
>| 3) 'static inline' is better than a macro
>|
>| Static inline functions are greatly preferred over macros.
>| They provide type safety, have no length limitations, no formatting
>| limitations, and under gcc they are as cheap as macros.
>|
>| Macros should only be used for cases where a static inline is clearly
>| suboptimal [there a few, isolated cases of this in fast paths],
>| or where it is impossible to use a static inline function [such as
>| string-izing].
>
> Oops. Thanks, Paul.
>
> I agree that the inline looks better than the macro (more readable,
> possibly more maintainable), but not that the multi-line macro
> is _evil_ (which is what Martin said).

It's not that this multi-line macro was particularly offensive ... it's
that I've seen the most heinous crap in the past ... and the only sensible
place I can find to draw a line is ... no multiline macros ;-)

M.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/