Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1327874

Re: [PATCH 1/2] printk: introduce pr_default() macro

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] printk: introduce pr_default() macro
Date 2016-02-05 17:20 +0100
Message-ID <qYRgZ-2zl-5@gated-at.bofh.it> (permalink)
References <qYOVQ-SY-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 2016-02-05 at 21:48 +0800, Chen Yucong wrote:
> Until now, we cover all log-levels by pr_<level>  macros except
> KERN_DEFAULT one. Add it for convenience.
> 
> Signed-off-by: Chen Yucong <slaoub@gmail.com>
> ---
>  include/linux/printk.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/linux/printk.h b/include/linux/printk.h
> index 51dd6b8..9808130 100644
> --- a/include/linux/printk.h
> +++ b/include/linux/printk.h
> @@ -274,6 +274,8 @@ extern asmlinkage void dump_stack(void) __cold;
>   */
>  #define pr_cont(fmt, ...) \
>  	printk(KERN_CONT fmt, ##__VA_ARGS__)
> +#define pr_default(fmt, ...) \
> +	printk(KERN_DEFAULT pr_fmt(fmt), ##__VA_ARGS__)
>  
>  /* pr_devel() should produce zero code unless DEBUG is defined */
>  #ifdef DEBUG
> @@ -345,6 +347,8 @@ extern asmlinkage void dump_stack(void) __cold;
>  	printk_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
>  #define pr_cont_once(fmt, ...)					
> \
>  	printk_once(KERN_CONT pr_fmt(fmt), ##__VA_ARGS__)
> +#define pr_default_once(fmt, ...)				\
> +	printk_once(KERN_DEFAULT pr_fmt(fmt), ##__VA_ARGS__)
>  
>  #if defined(DEBUG)
>  #define pr_devel_once(fmt, ...)					
> \
> @@ -396,6 +400,8 @@ extern asmlinkage void dump_stack(void) __cold;
>  	printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
>  #define pr_info_ratelimited(fmt, ...)				
> 	\
>  	printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
> +#define pr_default_ratelimited(fmt, ...)				
> \
> +	printk_ratelimited(KERN_DEFAULT pr_fmt(fmt), ##__VA_ARGS__)
>  /* no pr_cont_ratelimited, don't do that... */
>  
>  #if defined(DEBUG)

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] printk: introduce pr_default() macro Chen Yucong <slaoub@gmail.com> - 2016-02-05 14:50 +0100
  [PATCH 2/2] x86: use pr_default() macro Chen Yucong <slaoub@gmail.com> - 2016-02-05 14:50 +0100
  Re: [PATCH 1/2] printk: introduce pr_default() macro Joe Perches <joe@perches.com> - 2016-02-05 17:20 +0100
  Re: [PATCH 1/2] printk: introduce pr_default() macro Joe Perches <joe@perches.com> - 2016-02-05 17:20 +0100

csiph-web