lkml.org 
[lkml]   [2009]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] kernel.h: Add printk_ratelimited and pr_<level>_rl
    From
    Date
    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.

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

    I added them for completeness, but...



    \
     
     \ /
      Last update: 2009-11-09 23:07    [W:0.021 / U:152.180 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site