Re: RFC run time configuration parameter checks in subdriver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 4, 2013 at 9:02 AM, Antti Palosaari <crope@xxxxxx> wrote:
> I would like to discuss if there is idea to validate subdriver parameters
> explicitly at run-time when subdriver module is load.
>
> There is configuration parameters for about every driver like:
> * I2C address
> * clock frequency
>
> Nowadays, when main driver loads subdriver, it passes those static
> compile-time parameters to the subdriver, those parameters are not mainly
> validated at all. That could lead situation device is not working, instead
> it is will fail with some error, like I/O as I2C address is wrong.
>
> As these parameters are set compile time, this situation affects only
> developers which are adding support for new hardware.
>
> regards
> Antti

As Linux itself appeals most to developers, or at least we as
developers want to encourage Linux users to be involved in their
operating system, I believe it is indeed best to provide checking and
error reporting for the sake of development (especially by newcomer
programmers) during driver bring-up *and* for the use case of users
themselves.

I understand that you are very concerned with "bloat" of what you
consider to be potentially unnecessary checks, but I do believe that
this is better for the grand scheme of things.  If you have concerns
about "bloat" then I would indeed find it friendly to make these such
checks conditional to be included in debug mode, only.  (or if the
kernel is compiled with the media subsystem's "advanced debug" flag
enabled)

Is that a fair compromise?

Cheers,

Mike Krufky
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux