Re: [PATCH] dm-core-add-ratelimit-printing.patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hmmm, yes.  that was stupid.

 brassow

On Apr 9, 2007, at 12:23 PM, Olaf Kirch wrote:

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@xxxxxx |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux