Re: sysfs file creation result nightmare

2006-12-20 Thread Benjamin Herrenschmidt
> sysfs_create_group() and remove_group() handles this just fine right > now. Or it should, if not, please let me know and I'll fix it. Ok, I didn't know about these. I'll have a look. Thanks ! > As for the bin_file stuff, those are very rare. And I'll gladly take > patches that keep bad thing

Re: sysfs file creation result nightmare

2006-12-20 Thread Greg KH
On Fri, Dec 15, 2006 at 12:31:03PM -0800, Andrew Morton wrote: > On Sat, 16 Dec 2006 07:16:13 +1100 > Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > > > Beware that sysfs_remove_bin_file() will complain loudly if you later > > > attempt to delete that file that was never created. > > > > T

Re: sysfs file creation result nightmare

2006-12-15 Thread Andrew Morton
On Sat, 16 Dec 2006 07:16:13 +1100 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > Beware that sysfs_remove_bin_file() will complain loudly if you later > > attempt to delete that file that was never created. > > That's another problem... what is a driver that creates 15 files > supposed to

Re: sysfs file creation result nightmare

2006-12-15 Thread Benjamin Herrenschmidt
> Beware that sysfs_remove_bin_file() will complain loudly if you later > attempt to delete that file that was never created. That's another problem... what is a driver that creates 15 files supposed to do ? Have 15 booleans to remember which files where successfully created and then test all of

Re: sysfs file creation result nightmare

2006-12-15 Thread Jean Delvare
Ben, On Sun, 10 Dec 2006 11:55:31 +1100, Benjamin Herrenschmidt wrote: > > 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

Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)

2006-12-14 Thread Bill Davidsen
Andrew Morton wrote: Generally speaking, if sysfs file creation went wrong, it's due to a bug. The result is that the driver isn't working as intended: tunables or instrumentation which it is designed to make available are not present. We want to know about that bug asap so we can get it fixed

Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)

2006-12-09 Thread Benjamin Herrenschmidt
> 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 t

Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)

2006-12-09 Thread Andrew Morton
On Sat, 9 Dec 2006 23:34:19 +0100 Olivier Galibert <[EMAIL PROTECTED]> wrote: > On Sat, Dec 09, 2006 at 01:58:29PM -0800, Andrew Morton wrote: > > On Sat, 9 Dec 2006 22:44:53 +0100 > > Olivier Galibert <[EMAIL PROTECTED]> wrote: > > > Hmmm, I don't understand. Which is the bug, having a sysfs fil

Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)

2006-12-09 Thread Olivier Galibert
On Sat, Dec 09, 2006 at 01:58:29PM -0800, Andrew Morton wrote: > On Sat, 9 Dec 2006 22:44:53 +0100 > Olivier Galibert <[EMAIL PROTECTED]> wrote: > > Hmmm, I don't understand. Which is the bug, having a sysfs file > > creation fail or going on if it happens? > > Probably the former, probably the l

Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)

2006-12-09 Thread Andrew Morton
On Sat, 9 Dec 2006 22:44:53 +0100 Olivier Galibert <[EMAIL PROTECTED]> wrote: > On Sat, Dec 09, 2006 at 12:38:17PM -0800, Andrew Morton wrote: > > On Sun, 10 Dec 2006 06:59:10 +1100 > > Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > > Why would I prevent the framebuffer from initializing (a

Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)

2006-12-09 Thread Olivier Galibert
On Sat, Dec 09, 2006 at 12:38:17PM -0800, Andrew Morton wrote: > On Sun, 10 Dec 2006 06:59:10 +1100 > Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > Why would I prevent the framebuffer from initializing (and thus a > > console to be displayed at all on many machines) just because for some >

Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)

2006-12-09 Thread Benjamin Herrenschmidt
> > Why would I prevent the framebuffer from initializing (and thus a > > console to be displayed at all on many machines) just because for some > > reason, I couldn't create a pair of EDID files in sysfs that are not > > even very useful anymore ? > > Because there's a bug in your kernel. We do

Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)

2006-12-09 Thread Benjamin Herrenschmidt
On Sat, 2006-12-09 at 22:22 +0200, Muli Ben-Yehuda wrote: > On Sun, Dec 10, 2006 at 06:59:10AM +1100, Benjamin Herrenschmidt wrote: > > > I'd really like to have some kind of macro or attribute or whatever I > > can put on a function call to say that I'm purposefully ignoring the > > error. Is the

Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)

2006-12-09 Thread Andrew Morton
On Sun, 10 Dec 2006 06:59:10 +1100 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > On Sat, 2006-12-09 at 16:56 +0100, Jean Delvare wrote: > > > Check for error on radeonfb device sysfs files creation. This fixes the > > following warnings: > > (Moving to LKML as I think that's a generic issu

Re: sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings)

2006-12-09 Thread Muli Ben-Yehuda
On Sun, Dec 10, 2006 at 06:59:10AM +1100, Benjamin Herrenschmidt wrote: > I'd really like to have some kind of macro or attribute or whatever I > can put on a function call to say that I'm purposefully ignoring the > error. Is there some gcc magic that can do that ? (void)bla()? Cheers, Muli - T