[LinuxBIOS] [RFC] Macros vs. functions for better readability

Russell Whitaker russ at ashlandhome.net
Mon Jan 7 02:08:29 CET 2008



On Sun, 6 Jan 2008, ron minnich wrote:

> On Jan 6, 2008 1:43 PM, Juergen Beisert <juergen127 at kreuzholzen.de> wrote:
>
>> getCx86 and setCx86 defined as inline functions are working in all cases. So:
>> Do not use macros as functions.
>
> That's a good point. It's easy to get fooled by macros.

How about something a little more simple-minded yet keeping it readable?

Thus:

#define  EDGE  MP_IRQ_TRIGGER_EDGE
#define  LEVEL MP_IRQ_TRIGGER_LEVEL
#define  HIGH  MP_IRQ_POLARITY_HIGH
#define  LOW   MP_IRO_PLOARITY_LOW

   Russ




More information about the coreboot mailing list