public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Borislav Petkov <bp@alien8.de>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 2/4] x86, alternatives: Cleanup DPRINTK macro
Date: Mon, 05 Jan 2015 09:16:43 -0800	[thread overview]
Message-ID: <1420478203.2652.17.camel@perches.com> (raw)
In-Reply-To: <1420470013-26413-3-git-send-email-bp@alien8.de>

On Mon, 2015-01-05 at 16:00 +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.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)




  reply	other threads:[~2015-01-05 17:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-05 15:00 [RFC PATCH 0/4] x86, alternatives: Insn padding and more robust JMPs Borislav Petkov
2015-01-05 15:00 ` [RFC PATCH 1/4] x86, copy_user: Remove FIX_ALIGNMENT define Borislav Petkov
2015-01-05 15:00 ` [RFC PATCH 2/4] x86, alternatives: Cleanup DPRINTK macro Borislav Petkov
2015-01-05 17:16   ` Joe Perches [this message]
2015-01-05 15:00 ` [RFC PATCH 3/4] alternatives: Add instruction padding Borislav Petkov
2015-01-05 15:00 ` [RFC PATCH 4/4] alternatives: Make JMPs more robust Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1420478203.2652.17.camel@perches.com \
    --to=joe@perches.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox