Messages in this thread | | | Date | Tue, 20 Jan 2004 21:30:37 -0800 | From | Andrew Morton <> | Subject | Re: More cleanups for swsusp |
| |
Rusty Russell <rusty@rustcorp.com.au> wrote: > > In message <20040120225219.GA19190@elf.ucw.cz> you write: > > - if (fill_suspend_header(&cur->sh)) > > - panic("\nOut of memory while writing header"); > > + BUG_ON (fill_suspend_header(&cur->sh)); > > ... > 3) BUG_ON(complex condition expression) is much less clear than: > > if (complex condition expression) > BUG();
Worse. If some smarty goes and makes BUG_ON a no-op (for space reasons), it will break software suspend. We should ensure that the expression which is supplied to BUG_ON() never has side-effects for this reason.
I'll drop that chunk.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |