2005-03-21 16:10:35

by Magnus Damm

[permalink] [raw]
Subject: [PATCH] dvb_frontend: MODULE_PARM_DESC

Remove "dvb_"-prefix from parameters. Without the patch all parameters except
the declaration of parameter "frontend_debug" have a "dvb_"-prefix.

Error detected with section2text.rb, see autoparam patch.

--- linux-2.6.12-rc1/drivers/media/dvb/dvb-core/dvb_frontend.c 2005-03-20 18:20:16.000000000 +0100
+++ linux-2.6.12-rc1-autoparam/drivers/media/dvb/dvb-core/dvb_frontend.c 2005-03-21 16:00:15.000000000 +0100
@@ -48,15 +48,15 @@
static int dvb_powerdown_on_sleep = 1;

module_param_named(frontend_debug, dvb_frontend_debug, int, 0644);
-MODULE_PARM_DESC(dvb_frontend_debug, "Turn on/off frontend core debugging (default:off).");
-module_param(dvb_shutdown_timeout, int, 0444);
-MODULE_PARM_DESC(dvb_shutdown_timeout, "wait <shutdown_timeout> seconds after close() before suspending hardware");
-module_param(dvb_force_auto_inversion, int, 0444);
-MODULE_PARM_DESC(dvb_force_auto_inversion, "0: normal (default), 1: INVERSION_AUTO forced always");
-module_param(dvb_override_tune_delay, int, 0444);
-MODULE_PARM_DESC(dvb_override_tune_delay, "0: normal (default), >0 => delay in milliseconds to wait for lock after a tune attempt");
-module_param(dvb_powerdown_on_sleep, int, 0444);
-MODULE_PARM_DESC(dvb_powerdown_on_sleep, "0: do not power down, 1: turn LNB volatage off on sleep (default)");
+MODULE_PARM_DESC(frontend_debug, "Turn on/off frontend core debugging (default:off).");
+module_param_named(shutdown_timeout, dvb_shutdown_timeout, int, 0444);
+MODULE_PARM_DESC(shutdown_timeout, "wait <shutdown_timeout> seconds after close() before suspending hardware");
+module_param_named(force_auto_inversion, dvb_force_auto_inversion, int, 0444);
+MODULE_PARM_DESC(force_auto_inversion, "0: normal (default), 1: INVERSION_AUTO forced always");
+module_param_named(override_tune_delay, dvb_override_tune_delay, int, 0444);
+MODULE_PARM_DESC(override_tune_delay, "0: normal (default), >0 => delay in milliseconds to wait for lock after a tune attempt");
+module_param_named(powerdown_on_sleep, dvb_powerdown_on_sleep, int, 0444);
+MODULE_PARM_DESC(powerdown_on_sleep, "0: do not power down, 1: turn LNB volatage off on sleep (default)");

#define dprintk if (dvb_frontend_debug) printk


2005-03-22 02:51:05

by Johannes Stezenbach

[permalink] [raw]
Subject: Re: [PATCH] dvb_frontend: MODULE_PARM_DESC

On Mon, Mar 21, 2005 at 05:10:27PM +0100, Magnus Damm wrote:
> Remove "dvb_"-prefix from parameters. Without the patch all parameters except
> the declaration of parameter "frontend_debug" have a "dvb_"-prefix.

Why is that dvb_ prefix a problem?

> Error detected with section2text.rb, see autoparam patch.

Please only fix errors and do not rename other parameters. We shouldn't
break users' modprobe.conf option settings.

Johannes

2005-03-22 08:06:37

by Magnus Damm

[permalink] [raw]
Subject: Re: [PATCH] dvb_frontend: MODULE_PARM_DESC

On Tue, 22 Mar 2005 03:51:04 +0100, Johannes Stezenbach <[email protected]> wrote:
> On Mon, Mar 21, 2005 at 05:10:27PM +0100, Magnus Damm wrote:
> > Remove "dvb_"-prefix from parameters. Without the patch all parameters except
> > the declaration of parameter "frontend_debug" have a "dvb_"-prefix.
>
> Why is that dvb_ prefix a problem?

It is no biggie and probably not worth breaking users' configuration
like you said, but most drivers do not have their KBUILD_MODNAME
included in the parameter names.

Setting parameters that have KBUILD_MODNAME as prefix from the kernel
commandline is then done by KBUILD_MODNAME.KBUILD_MODNAME_xxx and that
is plain ugly - especially when a list of parameters are generated
from the source.
Some bad citizens IMO:

dvb.dvb_shutdown_timeout, asus.asus_gid, arlan.arlan_entry_debug

> > Error detected with section2text.rb, see autoparam patch.
>
> Please only fix errors and do not rename other parameters. We shouldn't
> break users' modprobe.conf option settings.

Ok, just fixing errors: frontend_debug should be renamed to
dvb_frontend_debug or the parameter description should at least match
the parameter...

Thanks,

/ magnus

2005-03-22 12:32:09

by Johannes Stezenbach

[permalink] [raw]
Subject: Re: [PATCH] dvb_frontend: MODULE_PARM_DESC

On Tue, Mar 22, 2005 at 09:06:29AM +0100, Magnus Damm wrote:
> On Tue, 22 Mar 2005 03:51:04 +0100, Johannes Stezenbach <[email protected]> wrote:
> > On Mon, Mar 21, 2005 at 05:10:27PM +0100, Magnus Damm wrote:
> > > Remove "dvb_"-prefix from parameters. Without the patch all parameters except
> > > the declaration of parameter "frontend_debug" have a "dvb_"-prefix.
> >
> > Why is that dvb_ prefix a problem?
>
> It is no biggie and probably not worth breaking users' configuration
> like you said, but most drivers do not have their KBUILD_MODNAME
> included in the parameter names.
>
> Setting parameters that have KBUILD_MODNAME as prefix from the kernel
> commandline is then done by KBUILD_MODNAME.KBUILD_MODNAME_xxx and that
> is plain ugly - especially when a list of parameters are generated
> from the source.
> Some bad citizens IMO:
>
> dvb.dvb_shutdown_timeout, asus.asus_gid, arlan.arlan_entry_debug

I agree it's ugly. For now it's better not to touch them anyway.

Johannes