On Mon, Jul 17, 2006 at 01:55:09PM +1000, Jeremy Kerr wrote:
No, it's not really necessary, more a style thing. The BUG_ON only adds
an extra 3 instructions (subfic, addi and tdnei), which should be tiny
compared to the indirect branch.
When we were submitting a patch to add a
BUG_ON(!valid_dma_data_direction(dir)) to x86-64's DMA-API, Jeff
Garzik was vehemently opposed to adding a few instructions to "one of
the hottest paths in the kernel".
Cheers,
Muli