On Mon, Mar 22, 2021 at 6:07 PM Doug Anderson <diand...@chromium.org> wrote: > On Mon, Mar 22, 2021 at 9:43 AM Arnd Bergmann <a...@kernel.org> wrote: > > > > -#define v1printk(a...) do { \ > > - if (verbose) \ > > - printk(KERN_INFO a); \ > > - } while (0) > > -#define v2printk(a...) do { \ > > - if (verbose > 1) \ > > - printk(KERN_INFO a); \ > > - touch_nmi_watchdog(); \ > > - } while (0) > > -#define eprintk(a...) do { \ > > - printk(KERN_ERR a); \ > > - WARN_ON(1); \ > > - } while (0) > > +#define v1printk(a...) do { \ > > nit: In addition to the indentation change you're also lining up the > backslashes. Is that just personal preference, or is there some > official recommendation in the kernel? I don't really have a strong > opinion either way (IMO each style has its advantages).
I don't think there is an official recommendation, I just think the style is more common, and it helped my figure out what the indentation should look like in this case. > > > + if (verbose) \ > > + printk(KERN_INFO a); \ > > +} while (0) > > +#define v2printk(a...) do { \ > > + if (verbose > 1) \ > > + printk(KERN_INFO a); \ > > + touch_nmi_watchdog(); \ > > This touch_nmi_watchdog() is pretty wonky. I guess maybe the > assumption is that the "verbose level 2" prints are so chatty that the > printing might prevent us from touching the NMI watchdog in the way > that we normally do and thus we need an extra one here? > > ...but, in that case, I think the old code was _wrong_ and that the > intention was that the touch_nmi_watchdog() should only be if "verose > > 1" as the indentation implied. There doesn't feel like a reason to > touch the watchdog if we're not doing anything slow. No idea. It was like this in Jason's original version from 2008. Arnd _______________________________________________ Kgdb-bugreport mailing list Kgdb-bugreport@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport