[2.6 patch][0/3] BUG -> BUG_ON conversions
From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 08/28/04
- Previous message: Lee Revell: "Re: [patch] voluntary-preempt-2.6.8.1-P9"
- Next in thread: Adrian Bunk: "[2.6 patch][1/3] ipc/ BUG -> BUG_ON conversions"
- Reply: Adrian Bunk: "[2.6 patch][1/3] ipc/ BUG -> BUG_ON conversions"
- Reply: Adrian Bunk: "[2.6 patch][2/3] kernel/ BUG -> BUG_ON conversions"
- Reply: Adrian Bunk: "[2.6 patch][3/3] mm/ BUG -> BUG_ON conversions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 28 Aug 2004 17:11:37 +0200 To: Andrew Morton <akpm@osdl.org>
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Lee Revell: "Re: [patch] voluntary-preempt-2.6.8.1-P9"
- Next in thread: Adrian Bunk: "[2.6 patch][1/3] ipc/ BUG -> BUG_ON conversions"
- Reply: Adrian Bunk: "[2.6 patch][1/3] ipc/ BUG -> BUG_ON conversions"
- Reply: Adrian Bunk: "[2.6 patch][2/3] kernel/ BUG -> BUG_ON conversions"
- Reply: Adrian Bunk: "[2.6 patch][3/3] mm/ BUG -> BUG_ON conversions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|