All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Kirch <okir@lst.de>
To: dm-devel@redhat.com
Subject: Re: [PATCH] dm-core-add-ratelimit-printing.patch
Date: Mon, 9 Apr 2007 19:23:54 +0200	[thread overview]
Message-ID: <200704091923.55986.okir@lst.de> (raw)
In-Reply-To: <1175791012.24640.6.camel@hydrogen.msp.redhat.com>

On Thursday 05 April 2007 18:36, Jonathan Brassow wrote:
>  #define DMERR(f, arg...) printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg)
> +#define DMERR_LIMIT(f, arg...) \
> +	if (printk_ratelimit())	\
> +		printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg)

I would put a "do { ... } while (0)" around this, else you end up with nasty surprises
if it's used as in "if (..) DMERR_LIMIT(..) else do_something"

Olaf
-- 
Olaf Kirch  |  --- o --- Nous sommes du soleil we love when we play
okir@lst.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax

  parent reply	other threads:[~2007-04-09 17:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-05 16:36 [PATCH] dm-core-add-ratelimit-printing.patch Jonathan Brassow
2007-04-05 16:59 ` Bryn M. Reeves
2007-04-09 17:23 ` Olaf Kirch [this message]
2007-04-10  5:17   ` Jonathan Brassow

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=200704091923.55986.okir@lst.de \
    --to=okir@lst.de \
    --cc=dm-devel@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.