All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] constify drivers/block/floppy.c (2.6.17-rc1-mm3)
@ 2006-04-25 18:03 Andreas Mohr
  2006-04-26  3:19 ` Arthur Othieno
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andreas Mohr @ 2006-04-25 18:03 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1683 bytes --]

Hello all,

constify the few floppy module variables that can be constified
(see objdump -x floppy.ko).

Patch against 2.6.17-rc1-mm3.

Signed-off-by: Andreas Mohr <andi@lisas.de>

Thanks!


--- linux-2.6.17-rc1-mm3/drivers/block/floppy.c	2006-04-03 05:22:10.000000000 +0200
+++ linux-2.6.17-rc1-mm3/drivers/block/floppy.c.const	2006-04-25 19:57:40.000000000 +0200
@@ -505,7 +505,7 @@
 
 static sector_t floppy_sizes[256];
 
-static char floppy_device_name[] = "floppy";
+static const char floppy_device_name[] = "floppy";
 
 /*
  * The driver is trying to determine the correct media format
@@ -3954,7 +3954,7 @@
 	.media_changed	= check_floppy_change,
 	.revalidate_disk = floppy_revalidate,
 };
-static char *table[] = {
+static const char * const table[] = {
 	"", "d360", "h1200", "u360", "u720", "h360", "h720",
 	"u1440", "u2880", "CompaQ", "h1440", "u1680", "h410",
 	"u820", "h1476", "u1722", "h420", "u830", "h1494", "u1743",
@@ -3962,11 +3962,11 @@
 	"u3200", "u3520", "u3840", "u1840", "u800", "u1600",
 	NULL
 };
-static int t360[] = { 1, 0 },
+static const int t360[] = { 1, 0 },
 	t1200[] = { 2, 5, 6, 10, 12, 14, 16, 18, 20, 23, 0 },
 	t3in[] = { 8, 9, 26, 27, 28, 7, 11, 15, 19, 24, 25, 29, 31, 3, 4, 13,
 			17, 21, 22, 30, 0 };
-static int *table_sup[] =
+static const int * const table_sup[] =
     { NULL, t360, t1200, t3in + 5 + 8, t3in + 5, t3in, t3in };
 
 static void __init register_devfs_entries(int drive)

-- 
No programming skills!? Why not help translate many Linux applications! 
https://launchpad.ubuntu.com/rosetta
(or alternatively buy nicely packaged Linux distros/OSS software to help
support Linux developers creating shiny new things for you?)

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-04-26 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-25 18:03 [KJ] [PATCH] constify drivers/block/floppy.c (2.6.17-rc1-mm3) Andreas Mohr
2006-04-26  3:19 ` Arthur Othieno
2006-04-26  7:20 ` Andreas Mohr
2006-04-26 14:56 ` Alexey Dobriyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.