Re: [PATCH] more MODULE_PARM conversions

From: Geert Uytterhoeven
Date: Fri Nov 12 2004 - 06:36:49 EST


On Thu, 11 Nov 2004, Linux Kernel Mailing List wrote:
> ChangeSet 1.2156, 2004/11/11 13:50:06-08:00, rddunlap@xxxxxxxx
>
> [PATCH] more MODULE_PARM conversions
>
> Convert MODULE_PARM() to module_param().
>
> Signed-off-by: Randy Dunlap <rddunlap@xxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
> Signed-off-by: Linus Torvalds <torvalds@xxxxxxxx>

> diff -Nru a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c
> --- a/drivers/scsi/mesh.c 2004-11-11 15:26:05 -08:00
> +++ b/drivers/scsi/mesh.c 2004-11-11 15:26:05 -08:00
> @@ -60,22 +60,22 @@
> MODULE_DESCRIPTION("PowerMac MESH SCSI driver");
> MODULE_LICENSE("GPL");
>
> -MODULE_PARM(sync_rate, "i");
> -MODULE_PARM_DESC(sync_rate, "Synchronous rate (0..10, 0=async)");
> -MODULE_PARM(sync_targets, "i");
> -MODULE_PARM_DESC(sync_targets, "Bitmask of targets allowed to set synchronous");
> -MODULE_PARM(resel_targets, "i");
> -MODULE_PARM_DESC(resel_targets, "Bitmask of targets allowed to set disconnect");
> -MODULE_PARM(debug_targets, "i");
> -MODULE_PARM_DESC(debug_targets, "Bitmask of debugged targets");
> -MODULE_PARM(init_reset_delay, "i");
> -MODULE_PARM_DESC(init_reset_delay, "Initial bus reset delay (0=no reset)");
> -
> static int sync_rate = CONFIG_SCSI_MESH_SYNC_RATE;
> static int sync_targets = 0xff;
> static int resel_targets = 0xff;
> static int debug_targets = 0; /* print debug for these targets */
> static int init_reset_delay = CONFIG_SCSI_MESH_RESET_DELAY_MS;
> +
> +MODULE_PARM(sync_rate, int, 0);
^^^^^^^^^^^
Shouldn't these be module_parm?

> +MODULE_PARM_DESC(sync_rate, "Synchronous rate (0..10, 0=async)");
> +MODULE_PARM(sync_targets, int, 0);
> +MODULE_PARM_DESC(sync_targets, "Bitmask of targets allowed to set synchronous");
> +MODULE_PARM(resel_targets, int, 0);
> +MODULE_PARM_DESC(resel_targets, "Bitmask of targets allowed to set disconnect");
> +MODULE_PARM(debug_targets, int, 0644);
> +MODULE_PARM_DESC(debug_targets, "Bitmask of debugged targets");
> +MODULE_PARM(init_reset_delay, int, 0);
> +MODULE_PARM_DESC(init_reset_delay, "Initial bus reset delay (0=no reset)");
>
> static int mesh_sync_period = 100;
> static int mesh_sync_offset = 0;

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-
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/