Skip to contentSkip to conversation

BUG_ON() Conversion in fs/sysfs/

PATCH New Eric Sesterhenn / snakebyte 1 participant 1 message Jan 27, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 9/12 BUG_ON() Conversion in fs/sysfs/

hi,

this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away.

fs/sysfs/inode.c renamed from fs/sysfs/inode.c.orig +1 -2
@@ -176,8 +176,7 @@ const unsigned char * sysfs_get_name(str
 	struct bin_attribute * bin_attr;
 	struct sysfs_symlink  * sl;
 
-	if (!sd || !sd->s_element)
-		BUG();
+	BUG_ON(!sd || !sd->s_element);
 
 	switch (sd->s_type) {
 		case SYSFS_DIR:

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors