Skip to contentSkip to conversation

floppy: change MODULE_PARM to module_param in drivers/block/floppy.c

PATCH In review [email protected] 3 participants 4 messages Oct 30, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 floppy: change MODULE_PARM to module_param in drivers/block/floppy.c

Replace MODULE_PARM with module_param in drivers/block/floppy.c. Compile tested.

drivers/block/floppy.c +4 -3
diff -urN --exclude='*~' linux-2.6.9-original/drivers/block/floppy.c linux-2.6.9/drivers/block/floppy.c
@@ -180,6 +180,7 @@
 #include <linux/devfs_fs_kernel.h>
 #include <linux/device.h>
 #include <linux/buffer_head.h>	/* for invalidate_buffers() */
+#include <linux/moduleparam.h>
 
 /*
  * PS/2 floppies have much slower step rates than regular floppies.
@@ -4623,9 +4624,9 @@
 	wait_for_completion(&device_release);
 }
 
-MODULE_PARM(floppy, "s");
-MODULE_PARM(FLOPPY_IRQ, "i");
-MODULE_PARM(FLOPPY_DMA, "i");
+module_param(floppy, charp, 0);
+module_param(FLOPPY_IRQ, int, 0);
+module_param(FLOPPY_DMA, int, 0);
 MODULE_AUTHOR("Alain L. Knaff");
 MODULE_SUPPORTED_DEVICE("fd");
 MODULE_LICENSE("GPL");

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 18 lines · [email protected] wrote:

Replace MODULE_PARM with module_param in drivers/block/floppy.c. Compile tested.

diff -urN --exclude='*~' linux-2.6.9-original/drivers/block/floppy.c linux-2.6.9/drivers/block/floppy.c

drivers/block/floppy.c +1 -0
@@ -180,6 +180,7 @@
 #include <linux/devfs_fs_kernel.h>
 #include <linux/device.h>
 #include <linux/buffer_head.h>	/* for invalidate_buffers() */
+#include <linux/moduleparam.h>
 
 /*
  * PS/2 floppies have much slower step rates than regular floppies.
@@ -4623,9 +4624,9 @@
 	wait_for_completion(&device_release);
 }

drivers/block/floppy.c line 4632

Quoted 10 lines
drivers/block/floppy.c +3 -3
 
-MODULE_PARM(floppy, "s");
-MODULE_PARM(FLOPPY_IRQ, "i");
-MODULE_PARM(FLOPPY_DMA, "i");
+module_param(floppy, charp, 0);
+module_param(FLOPPY_IRQ, int, 0);
+module_param(FLOPPY_DMA, int, 0);
 MODULE_AUTHOR("Alain L. Knaff");
 MODULE_SUPPORTED_DEVICE("fd");
 MODULE_LICENSE("GPL");

Please check Andrew's 2.6.10-rc1-mm2 for a large MODULE_PARAM patch, and then convert drivers that are not yet converted...

http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm2/broken-out/convert-module_parm-to-module_param-family.patch

Signature · 5 lines
~Randy
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
#2 lore raw
Quoted 33 lines · Randy.Dunlap
Quoted 18 lines · [email protected] wrote:

Replace MODULE_PARM with module_param in drivers/block/floppy.c. Compile tested.

diff -urN --exclude='*~' linux-2.6.9-original/drivers/block/floppy.c linux-2.6.9/drivers/block/floppy.c

drivers/block/floppy.c +1 -0
@@ -180,6 +180,7 @@
 #include <linux/devfs_fs_kernel.h>
 #include <linux/device.h>
 #include <linux/buffer_head.h>	/* for invalidate_buffers() */
+#include <linux/moduleparam.h>
 
 /*
  * PS/2 floppies have much slower step rates than regular floppies.
@@ -4623,9 +4624,9 @@
 	wait_for_completion(&device_release);
 }

drivers/block/floppy.c line 4632

Quoted 10 lines
drivers/block/floppy.c +3 -3
 
-MODULE_PARM(floppy, "s");
-MODULE_PARM(FLOPPY_IRQ, "i");
-MODULE_PARM(FLOPPY_DMA, "i");
+module_param(floppy, charp, 0);
+module_param(FLOPPY_IRQ, int, 0);
+module_param(FLOPPY_DMA, int, 0);
 MODULE_AUTHOR("Alain L. Knaff");
 MODULE_SUPPORTED_DEVICE("fd");
 MODULE_LICENSE("GPL");

Please check Andrew's 2.6.10-rc1-mm2 for a large MODULE_PARAM patch, and then convert drivers that are not yet converted...

Quoted 2 lines

http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm2/broken-out/convert-module_parm-to-module_param-family.patch

Actually it would be nice if drivers were converted "intelligently" instead of basic find-and-replace - I really find parameter names like floppy.floppy= or floppy.floppy_dma= ugly.

Signature · 5 lines
Dmitry
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
author
#3 lore raw
Quoted 36 lines · Dmitry Torokhov
Quoted 34 lines · Randy.Dunlap
Quoted 18 lines · [email protected] wrote:

Replace MODULE_PARM with module_param in drivers/block/floppy.c. Compile tested.

diff -urN --exclude='*~' linux-2.6.9-original/drivers/block/floppy.c linux-2.6.9/drivers/block/floppy.c

drivers/block/floppy.c +1 -0
@@ -180,6 +180,7 @@
 #include <linux/devfs_fs_kernel.h>
 #include <linux/device.h>
 #include <linux/buffer_head.h>	/* for invalidate_buffers() */
+#include <linux/moduleparam.h>
 
 /*
 * PS/2 floppies have much slower step rates than regular floppies.
@@ -4623,9 +4624,9 @@
 	wait_for_completion(&device_release);
 }

drivers/block/floppy.c line 4632

Quoted 10 lines
drivers/block/floppy.c +3 -3
 
-MODULE_PARM(floppy, "s");
-MODULE_PARM(FLOPPY_IRQ, "i");
-MODULE_PARM(FLOPPY_DMA, "i");
+module_param(floppy, charp, 0);
+module_param(FLOPPY_IRQ, int, 0);
+module_param(FLOPPY_DMA, int, 0);
 MODULE_AUTHOR("Alain L. Knaff");
 MODULE_SUPPORTED_DEVICE("fd");
 MODULE_LICENSE("GPL");

Please check Andrew's 2.6.10-rc1-mm2 for a large MODULE_PARAM patch, and then convert drivers that are not yet converted...

Quoted 2 lines
Quoted 2 lines

http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm2/broken-out/convert-module_parm-to-module_param-family.patch

Sorry - that was a quickie w/o checking to see if someone else had already done it. See below.

Quoted 6 lines

Actually it would be nice if drivers were converted "intelligently" instead of basic find-and-replace - I really find parameter names like floppy.floppy= or floppy.floppy_dma= ugly.

Hmm. I can tak a look at that a little bit later - just got done with a *huge* cleanup of floppy.c - just gotta do the diffs and send them.

Jim

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors