lkml.org 
[lkml]   [2016]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [tip:x86/debug] printk: Make the printk*once() variants return a value
From
Date
On Fri, 2016-07-08 at 05:08 -0700, tip-bot for Borislav Petkov wrote:
> printk: Make the printk*once() variants return a value
[]
> diff --git a/include/linux/printk.h b/include/linux/printk.h
[]
> @@ -108,11 +108,14 @@ struct va_format {
>   * Dummy printk for disabled debugging statements to use whilst maintaining
>   * gcc's format checking.
>   */
> -#define no_printk(fmt, ...) \
> -do { \
> - if (0) \
> - printk(fmt, ##__VA_ARGS__); \
> -} while (0)
> +#define no_printk(fmt, ...) \
> +({ \
> + do { \
> + if (0) \
> + printk(fmt, ##__VA_ARGS__); \
> + } while (0); \
> + 0; \
> +})

This change isn't described in the commit message and there
doesn't seem to be a need to change this.

And as statement expressions these no longer need
"do { <foo> } while (0)" this could have been be simplified to

#define no_printk(fmt, ...)
({
if (0)
printk(fmt, ##__VA_ARGS__);
})

\
 
 \ /
  Last update: 2016-07-09 05:21    [W:0.134 / U:1.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site