lkml.org 
[lkml]   [2002]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: The end of embedded Linux?
Alan Cox wrote:
> On Mon, 2002-10-07 at 23:22, Christer Weinigel wrote:
> > #define printk_debug(xxx...) printk(KERN_DEBUG, xxx...)
> > #define printk_info(xxx...) printk(KERN_INFO, xx...)
> > #else
> > #define printk_debug(xxx...) do { } while (0)
> > #define printk_info(xxx...) do { } while (0)
>
> That might make a lot of sense. The macros in question would need a bit
> of hand checking for side effects in calls but yes this is the kind of
> thing that can be good

You can write the macros so the side effects are still executed if you
prefer. Untested:

#define printk_debug(xxx...) do { (void) (xxx ## , 0); } while (0)

-- Jamie

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

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.980 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site