mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Petr Mladek <pmladek@suse.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] printk: simplify no_printk()
Date: Sun, 17 Sep 2017 11:31:34 -0700	[thread overview]
Message-ID: <1505673094.16316.10.camel@perches.com> (raw)
In-Reply-To: <1505660504-11059-1-git-send-email-yamada.masahiro@socionext.com>

On Mon, 2017-09-18 at 00:01 +0900, Masahiro Yamada wrote:
> Commit 069f0cd00df0 ("printk: Make the printk*once() variants return
> a value") surrounded the macro implementation with ({ ... }).
> 
> Now, the inner do { ... } while (0); is redundant.

thanks.

> diff --git a/include/linux/printk.h b/include/linux/printk.h
[]
> @@ -131,10 +131,8 @@ struct va_format {
>   */
>  #define no_printk(fmt, ...)				\
>  ({							\
> -	do {						\
> -		if (0)					\
> -			printk(fmt, ##__VA_ARGS__);	\
> -	} while (0);					\
> +	if (0)						\
> +		printk(fmt, ##__VA_ARGS__);		\
>  	0;						\
>  })

  reply	other threads:[~2017-09-17 18:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-17 15:01 Masahiro Yamada
2017-09-17 18:31 ` Joe Perches [this message]
2017-09-26  6:43 ` Sergey Senozhatsky
2017-10-02 14:56 ` Petr Mladek
2017-10-19 10:48   ` Masahiro Yamada
2017-10-19 13:38     ` Petr Mladek

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=1505673094.16316.10.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=yamada.masahiro@socionext.com \
    /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

all inboxes | Powered by JetHome®