[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1420478203.2652.17.camel@perches.com>
Date: Mon, 05 Jan 2015 09:16:43 -0800
From: Joe Perches <joe@...ches.com>
To: Borislav Petkov <bp@...en8.de>
Cc: X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 2/4] x86, alternatives: Cleanup DPRINTK macro
On Mon, 2015-01-05 at 16:00 +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@...e.de>
>
> Make it pass __func__ implicitly. Also, dump info about each replacing
> we're doing. Fixup comments and style while at it.
It may be better to use dynamic debug functionality
directly with pr_debug instead of this __setup with
"debug-alternative".
It's becoming quite a bit more common to use the
#define macro(fmt, ...) style where you converted
back to the older #define macro(fmt, args...) style.
> diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
[]
> @@ -52,10 +52,10 @@ static int __init setup_noreplace_paravirt(char *str)
> __setup("noreplace-paravirt", setup_noreplace_paravirt);
> #endif
>
> -#define DPRINTK(fmt, ...) \
> -do { \
> - if (debug_alternative) \
> - printk(KERN_DEBUG fmt, ##__VA_ARGS__); \
> +#define DPRINTK(fmt, args...) \
> +do { \
> + if (debug_alternative) \
> + printk(KERN_DEBUG "%s: " fmt "\n", __func__, ##args); \
> } while (0)
--
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