On Mon, 2015-01-05 at 16:00 +0100, Borislav Petkov wrote:
> From: Borislav Petkov <[email protected]>
> 
> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to