Re: [PATCH] Fix VMI crash on boot in 2.6.27, 2.6.28 kernels

From: H. Peter Anvin
Date: Thu Dec 11 2008 - 18:41:39 EST


Greg KH wrote:
>> +#else
>> +#define vmi_init()
>> +#define vmi_activate()
>> +#define vmi_bringup()
>> +#endif
>
> static inline please, don't use #defines for function prototypes, it's
> not nice. See Andrew's previous rants about this for details :)

And if it is not possible, technically, for whatever reason, the proper
forms look like:

#define foo() ((void)0)
#define bar(x) ((void)(x))
#define baz(x,y) ((void)((x),(y)))

... which preserve side effects, even if they don't guarantee type safety.

-hpa
--
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/