Re: patch for 2.4.0 disable printk

Jamie Lokier (lk@tantalophile.demon.co.uk)
Sun, 28 Jan 2001 18:32:33 +0100


Stefani Seibold wrote:
> The inline function is the best choice, because it it full compatible to old
> old printk. No side effects are expeted.

What is the difference?
I can't think of any difference between:

#define printk(format, args...) ((int) 0)

and:

static inline int printk_inline (void) { return 0; }
#define printk(format, args...) (printk_inline ())

If you wanted to be fully compatible in the sense of evaluating the
printk arguments, in case those have side effects, there would be:

#define printk(format, args...) ((0 , ## args), (int) 0)

By the way, CONFIG_NO_PRINTK or CONFIG_DISABLE_PRINTK would be better
names. CONFIG_PRINTK suggests that enabling that option enabled printk.

enjoy,
-- Jamie

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