lkml.org 
[lkml]   [2008]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC, PATCH] watchdog on gpio
Date
Hi,

"Mike Frysinger" <vapier.adi@gmail.com> writes:

> wonder if we could design a printk designed for __init functions to
> address this in a clean fashion.
> #define init_printk(fmt, __VA_ARGS__) \
> do { \
> static const __init char __fmt[] = fmt; \
> printk(__fmt , ## __VA_ARGS__); \
> } while (0)
>
> (yes, i know this isnt perfect as you'd need to pass back the return
> value of printk(), but it's an idea)

How about:

#define init_printk(fmt, args...) ({ \
static const __init char __fmt[] = fmt; \
printk(__fmt, args); \
})

Now it returns the printk result.

Hannes


\
 
 \ /
  Last update: 2008-01-14 13:51    [W:0.058 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site