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

From: Benjamin Herrenschmidt
Date: Sat Dec 09 2006 - 15:56:22 EST



> > 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 don't hide and work around bugs.

But not initializing the fbdev will be much more effective at hiding the
bug than just displaying a warning, which could just be done inside
sysfs_create_file.

Besides, in most cases, there is no bug. That is, there is no bug that
will cause the file creation to fail and it will not fail.

> Just fix the bugs, for heck's sake.

Considering that in 99% of the case, the creation cannot fail unless
some cosmic ray hit your machine or you are running oom... that is,
plenty of cases where there is _no_ bug now gets a useless code bloat
for checking a result code where there is nothing sane you can do about
it anyway.

Ben.


-
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/