Re: patch for 2.4.0 disable printk

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Sun Jan 28 2001 - 12:32:33 EST


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/



This archive was generated by hypermail 2b29 : Wed Jan 31 2001 - 21:00:30 EST