[ofa-general] Re: [PATCH 2/14 v2] nes: device structures and defines
Roland Dreier
rdreier at cisco.com
Fri Oct 19 22:22:44 PDT 2007
> You are starting off on the wrong foot.
???
> > +if(!(expr)) { \
> > + printk(KERN_ERR PFX "Assertion failed! %s, %s, %s, line %d\n", \
> > + #expr, __FILE__, __FUNCTION__, __LINE__); \
> > +}
>
> Use BUG_ON
I agree that there's no need to invent a driver-private assertion
macro, but (to first order at least) drivers should never use BUG_ON.
I don't want some glitch in a network driver that the system could
probably survive to be turned into a panic by BUG_ON -- WARN_ON seems
infinitely preferable.
- R.
More information about the general
mailing list