* [PATCH] const initdata.
@ 2001-08-23 23:55 Dave Jones
2001-08-24 15:00 ` Anders Peter Fugmann
0 siblings, 1 reply; 4+ messages in thread
From: Dave Jones @ 2001-08-23 23:55 UTC (permalink / raw)
To: Alan Cox, Linus Torvalds; +Cc: Linux Kernel Mailing List
As defined in in Rusty's kernel-hacking doc, __initdata must not be
marked as const. Patch below does this for the PCI subsystem.
*nb*, This kind of patch needs to be done in quite a few other
places too.
regards,
Dave.
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs .
diff -urN --exclude-from=/home/davej/.exclude linux-ac/drivers/pci/names.c linux-dj/drivers/pci/names.c
--- linux-ac/drivers/pci/names.c Mon Oct 2 20:00:16 2000
+++ linux-dj/drivers/pci/names.c Fri Aug 24 00:48:59 2001
@@ -32,9 +32,9 @@
* real memory.. Parse the same file multiple times
* to get all the info.
*/
-#define VENDOR( vendor, name ) static const char __vendorstr_##vendor[] __initdata = name;
+#define VENDOR( vendor, name ) static char __vendorstr_##vendor[] __initdata = name;
#define ENDVENDOR()
-#define DEVICE( vendor, device, name ) static const char __devicestr_##vendor##device[] __initdata = name;
+#define DEVICE( vendor, device, name ) static char __devicestr_##vendor##device[] __initdata = name;
#include "devlist.h"
@@ -43,7 +43,7 @@
#define DEVICE( vendor, device, name ) { 0x##device, 0, __devicestr_##vendor##device },
#include "devlist.h"
-static const struct pci_vendor_info __initdata pci_vendor_list[] = {
+static struct pci_vendor_info __initdata pci_vendor_list[] = {
#define VENDOR( vendor, name ) { 0x##vendor, sizeof(__devices_##vendor) / sizeof(struct pci_device_info), __vendorstr_##vendor, __devices_##vendor },
#define ENDVENDOR()
#define DEVICE( vendor, device, name )
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] const initdata.
2001-08-23 23:55 [PATCH] const initdata Dave Jones
@ 2001-08-24 15:00 ` Anders Peter Fugmann
2001-08-24 15:18 ` Alan Cox
0 siblings, 1 reply; 4+ messages in thread
From: Anders Peter Fugmann @ 2001-08-24 15:00 UTC (permalink / raw)
To: Dave Jones; +Cc: Linux Kernel Mailing List
How "bad" is it to have __initdata declared static?
A quick scan through the kernel tree shows
that 27 .h and 355 .c files needa patching.
(a total of 845 places)
Numbers are from 2.4.9 kernel.
It should be very easy to correct through a script.
Regards
Anders Fugmann
Dave Jones wrote:
> As defined in in Rusty's kernel-hacking doc, __initdata must not be
> marked as const. Patch below does this for the PCI subsystem.
>
> *nb*, This kind of patch needs to be done in quite a few other
> places too.
>
> regards,
>
> Dave.
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-08-24 15:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-23 23:55 [PATCH] const initdata Dave Jones
2001-08-24 15:00 ` Anders Peter Fugmann
2001-08-24 15:18 ` Alan Cox
2001-08-24 15:26 ` Anders Peter Fugmann
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.