[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090226093100.GB8111@localhost>
Date: Thu, 26 Feb 2009 12:31:00 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Ingo Molnar <mingo@...e.hu>,
Harvey Harrison <harvey.harrison@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] introduce pr_cont macro
[H. Peter Anvin - Wed, Feb 25, 2009 at 09:28:57PM -0800]
> Ingo Molnar wrote:
>>
>> Btw., why do those macros use ##__VA_ARGS__ ? Why not a
>> straightforward:
>>
>> #define __pr_cont(args...) \
>> printk(KERN_CONT args)
>>
>
> Don't know if anyone cares, but __VA_ARGS__ is C99 whereas args... is a
> gcc extension, AFAIK.
>
> -hpa
>
This one should be fine.
- Cyrill -
---
Subject: [PATCH] introduce pr_cont macro v2
We cover all log-levels by pr_... macros except
KERN_CONT one. Add it for convenience.
Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>
---
Using 'fmt' here make this macro look similar
to others (same missioned) macros. Which is
good :)
include/linux/kernel.h | 2 ++
1 file changed, 2 insertions(+)
Index: linux-2.6.git/include/linux/kernel.h
===================================================================
--- linux-2.6.git.orig/include/linux/kernel.h
+++ linux-2.6.git/include/linux/kernel.h
@@ -370,6 +370,8 @@ static inline char *pack_hex_byte(char *
printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
#define pr_info(fmt, ...) \
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_cont(fmt, ...) \
+ printk(KERN_CONT fmt, ##__VA_ARGS__)
/* If you are writing a driver, please use dev_dbg instead */
#if defined(DEBUG)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists