lkml.org 
[lkml]   [2017]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] printk: simplify no_printk()
From
Date
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; \
> })

\
 
 \ /
  Last update: 2017-09-17 20:32    [W:0.058 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site