Re: [PATCH 3/3] EDAC: amd64_edac: decide if driver can load successfully early.
From: Borislav Petkov
Date: Thu Mar 19 2015 - 13:29:01 EST
On Thu, Mar 19, 2015 at 01:15:57PM -0400, Tejun Heo wrote:
> To add a bit, seriously, try to take a step back from your one driver
> and look at the larger picture. The association between module being
> loaded or not and hardware capability has been long broken. It's not
> a useable way to communicate anything to userland. What if the module
> is built-in? What's the difference between your precious one driver
> and all others? How is userland supposed to tell? This is really you
> implementing what should have been in your /etc/rc.local in kernel
> driver and is totally unacceptable. Please don't pull stunts like
> this.
Ok, since when is a driver returning !0 from its init routine and thus
not registering, wrong? And my "precious" driver, as you put it, is by
far not the only one.
And since when am I the bad guy for wanting to not confuse my users by
simply not loading the driver if there's no need for it?
[ And yes, I have had bug reports of people saying amd64_edac is loaded
but why am I not getting any errors reported. ]
And yes, it is dumb to load drivers and leave them loaded even when
there's no need for them/no use. Not from some layering/driver
model/whatever technical perspective but from a simple usability
standpoint.
If I do lsmod and see a bunch of drivers but don't know what is used or
not, then we have failed.
And why are you wasting so much time with debating this?
If the driver init routine would do
if (!ecc_supported)
return -EINVAL;
would be fine for you but if it did the same thing in a more involved
manner, then that's a problem?
Geez.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
--
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/