Re: More cleanups for swsusp

Rusty Russell
2004-01-21T05:18:42Z

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));

1) fill_suspend_header never fails, perhaps make it return void.

2) If fill_suspend_header could fail, you should indicate why it won't
fail here, and

3) BUG_ON(complex condition expression) is much less clear than:

if (complex condition expression)
BUG();

Cheers,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.