Re: [PATCH 5/5] printk: provide a filtering macro for printk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 02, 2009 at 06:44:19PM +0200, Marco Stornelli wrote:
> 
> 
> Marc Andre Tanner ha scritto:
> > +#define printk(fmt, ...) ( 							\
> 
> Shouldn't it be an and?

Don't think so. If the expression isn't constant we are unable to filter it
and therefore printk is called anyway. However if the expression is constant
the second part of the condition is evaluated and we filter based on the 
verbosity level.

> > +	(!__builtin_constant_p(PRINTK_FILTER((fmt))) || PRINTK_FILTER((fmt))) ?	\
> > +		printk((fmt), ##__VA_ARGS__) : 0				\
> > +)
> > +
> > +#endif /* CONFIG_PRINTK_VERBOSITY */
> > +

Marc

-- 
 Marc Andre Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux