public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Naohiro Ooiwa <nooiwa@miraclelinux.com>,
	Ingo Molnar <mingo@elte.hu>,
	Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>,
	roland@redhat.com, Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	oleg@redhat.com
Subject: Re: [PATCH] kernel.h: Add printk_ratelimited and pr_<level>_rl
Date: Mon, 09 Nov 2009 14:28:09 -0800	[thread overview]
Message-ID: <4AF89779.9090601@oracle.com> (raw)
In-Reply-To: <1257804320.12852.16.camel@Joe-Laptop.home>

Joe Perches wrote:
> On Mon, 2009-11-09 at 13:49 -0800, Andrew Morton wrote:
>> On Fri, 30 Oct 2009 16:21:47 -0700
>> Joe Perches <joe@perches.com> wrote:
>>> +#define pr_emerg_rl(fmt, ...) \
>>> +        printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
>>> +#define pr_alert_rl(fmt, ...) \
>>> +        printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
>>> +#define pr_crit_rl(fmt, ...) \
>>> +        printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
>>> +#define pr_err_rl(fmt, ...) \
>>> +        printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
>>> +#define pr_warning_rl(fmt, ...) \
>>> +        printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
>>> +#define pr_notice_rl(fmt, ...) \
>>> +        printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
>>> +#define pr_info_rl(fmt, ...) \
>>> +        printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
>> Would prefer pr_emerg_ratelimited personally.  It's longer, but one
>> doesn't ask "wtf does _rl" mean and it avoids having two identifiers
>> which refer to the same thing.
> 
> I don't have a strong opinion either way.
> _rl is shorter and that has some value.

but we have a long history of not using cryptic abbreviations,
so I agree with Andrew.

> I think pr_crit_rl, pr_emerg_rl and pr_alert_rl likely
> aren't useful.  Is there a sensible use case for those?

Not likely.

> I added them for completeness, but...


  reply	other threads:[~2009-11-09 22:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-30 11:36 [PATCH] show message when exceeded rlimit of pending signals Naohiro Ooiwa
2009-10-30 21:33 ` Andrew Morton
2009-10-30 21:45   ` Joe Perches
2009-10-30 23:21     ` [PATCH] kernel.h: Add printk_ratelimited and pr_<level>_rl Joe Perches
2009-11-02 15:58       ` Ingo Molnar
2009-11-05 14:16         ` Naohiro Ooiwa
2009-11-05 14:44           ` Naohiro Ooiwa
2009-11-09 21:49       ` Andrew Morton
2009-11-09 22:05         ` Joe Perches
2009-11-09 22:28           ` Randy Dunlap [this message]
2009-11-10  5:18           ` Ingo Molnar
2009-11-10  5:17         ` Ingo Molnar
2009-11-10  7:34           ` Peter Zijlstra
2009-11-10  7:39             ` Ingo Molnar
2009-11-10  7:54               ` Joe Perches
2009-11-10  8:21               ` Peter Zijlstra
2009-10-31  7:58   ` [PATCH] show message when exceeded rlimit of pending signals Naohiro Ooiwa
2009-10-31  8:50     ` Naohiro Ooiwa
2009-10-31  8:57       ` Andrew Morton
2009-10-31 11:05         ` Naohiro Ooiwa

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=4AF89779.9090601@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=h-shimamoto@ct.jp.nec.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nooiwa@miraclelinux.com \
    --cc=oleg@redhat.com \
    --cc=roland@redhat.com \
    --cc=tglx@linutronix.de \
    /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