Messages in this thread | | | Subject | RE: [PATCH 1/2] printk: add interface for disabling recursion check | From | Yanmin Zhang <> | Date | Mon, 28 May 2012 08:30:58 +0800 |
| |
On Fri, 2012-05-25 at 16:09 +0000, Luck, Tony wrote: > +void printk_recursion_check_enable(void) > +{ > + atomic_dec(&recursion_check_disabled); > +} > > > Is it worth a BUG_ON() in here to check that recursion_check_disabled > is >=1 before blindly decrementing it? Or is this interface so simple > that nobody would ever get this wrong? Tony,
The interface is clear and simple. But a WARN_ON checking is better to have. We would add WARN_ON.
Thanks, Yanmin
| |