> And (ultimately) make the function return void. > > Yes, that's probably a valid approach - we've discussed it before but nobody has > taken it further. I would have preferred that approach (with a WARN_ON rather than a BUG though). On the other hand that would make it slightly harder for the few cases (if any ?) who actually want something like a "create if it doesn't exist already" semantic. I'm a bit worried by the amount of code added by systematic checking of the results for cases that really should never happen. That's why I prefer a BUG/WARN type semantic. Maybe the best is to have the examples like radeonfb actually do the WARN_ON(sysfs_create_file(...)); Ben. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: sysfs file creation result nightmare
- From: Jean Delvare <[email protected]>
- Re: sysfs file creation result nightmare
- References:
- sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Benjamin Herrenschmidt <[email protected]>
- Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Andrew Morton <[email protected]>
- Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Olivier Galibert <[email protected]>
- Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Andrew Morton <[email protected]>
- Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Olivier Galibert <[email protected]>
- Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- From: Andrew Morton <[email protected]>
- sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- Prev by Date: Re: 2.6.19-rt11 boot failure
- Next by Date: Re: is there any Hard-disk shock-protection for 2.6.18 and above?
- Previous by thread: Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)
- Next by thread: Re: sysfs file creation result nightmare
- Index(es):