Re: [PATCH 2.6.6] bootmem.c cleanup

Andrew Morton
2004-05-14T20:34:25Z

Michael Buesch <mbuesch@freenet.de> wrote:
>
> - if (!test_and_clear_bit(i, bdata->node_bootmem_map))
> - BUG();
> + BUG_ON(!test_and_clear_bit(i, bdata->node_bootmem_map));

Please don't put expressions whihc actually change state inside BUG_ON().
Someone may decide to make BUG_ON() a no-op to save space.

I'm not aware of anyone actually trying that, but it's a good objective.