--- On Thu, 16/8/12, Antti Palosaari <crope@xxxxxx> wrote: > Hello Hiroshi > > On 08/16/2012 10:12 AM, Hiroshi Doyu wrote: > > Hi Antti, > > > > Antti Palosaari <crope@xxxxxx> > wrote @ Thu, 16 Aug 2012 03:11:56 +0200: > > > >> Hello Hiroshi, > >> > >> I see you have added dev_dbg_ratelimited() > recently, commit > >> 6ca045930338485a8cdef117e74372aa1678009d . > >> > >> However it seems to be noisy as expected similar > behavior than normal > >> dev_dbg() without a ratelimit. > >> > >> I looked ratelimit.c and there is: > >> printk(KERN_WARNING "%s: %d callbacks > suppressed\n", func, rs->missed); > >> > >> What it looks my eyes it will print those > "callbacks suppressed" always > >> because KERN_WARNING. > > > > Right. Can the following fix the problem? > > No. That silences dev_dbg_reatelimited() totally. > dev_dbg() works as expected printing all the debugs. But > when I change > it to dev_dbg_reatelimited() all printings are silenced. That's probably correct - the patch looks a bit strange... I did not try the patch, but had a quick look at the file and noted that in include/linux/device.h, "info" (and possibly another level) are treated specially... just thought I should mention this. > >>From 905b1dedb6c64bc46a70f6d203ef98c23fccb107 Mon > Sep 17 00:00:00 2001 > > From: Hiroshi Doyu <hdoyu@xxxxxxxxxx> > > Date: Thu, 16 Aug 2012 10:02:11 +0300 > > Subject: [PATCH 1/1] driver-core: Shut up > dev_dbg_reatelimited() without > > DEBUG > > > > dev_dbg_reatelimited() without DEBUG printed "217078 > callbacks > > suppressed". This shouldn't print anything without > DEBUG. > > > > Signed-off-by: Hiroshi Doyu <hdoyu@xxxxxxxxxx> > > Reported-by: Antti Palosaari <crope@xxxxxx> > > --- > > include/linux/device.h | > 6 +++++- > > 1 files changed, 5 insertions(+), 1 > deletions(-) > > > > diff --git a/include/linux/device.h > b/include/linux/device.h > > index eb945e1..d4dc26e 100644 > > --- a/include/linux/device.h > > +++ b/include/linux/device.h > > @@ -962,9 +962,13 @@ do { > > > \ > > > dev_level_ratelimited(dev_notice, dev, fmt, ##__VA_ARGS__) > > #define dev_info_ratelimited(dev, fmt, > ...) > \ > > > dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__) > > +#if defined(DEBUG) > > #define dev_dbg_ratelimited(dev, fmt, > ...) > \ > > > dev_level_ratelimited(dev_dbg, dev, fmt, ##__VA_ARGS__) > > - > > +#else > > +#define dev_dbg_ratelimited(dev, fmt, > ...) > \ > > + no_printk(KERN_DEBUG pr_fmt(fmt), > ##__VA_ARGS__) > > +#endif > > /* > > * Stupid hackaround for existing uses of > non-printk uses dev_info > > * > > > > regards > Antti > > -- > http://palosaari.fi/ > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html