[2.6 patch][0/3] BUG -> BUG_ON conversions
From: Adrian Bunk
Date: Sat Aug 28 2004 - 10:13:03 EST
Hi Andrew,
in the following mails are the first [1] three patches that convert
if(foo)
BUG():
to
BUG_ON(foo);
This makes the code slightly better readable and it might result in
slightly better code with recent gcc versions due to the "unlikely" in
the definition of BUG_ON (it might not be a measurable difference, but
it comes for free).
Obviosly, in constructs like
if (foo) {
printk(KERN_ERR "some error");
BUG();
}
or
switch (foo) {
case A:
...
break;
case B:
...
break;
default:
BUG();
}
BUG() can't be replaced by BUG_ON(), and it's therefore unchanged.
cu
Adrian
[1] I plan to send more such patches.
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/