LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: <linux-kernel@vger.kernel.org>
Cc: "Greg Kroah-Hartman" <GregKH@novell.com>
Subject: [PATCH 3/4] introduce __devinitconst
Date: Fri, 11 Jan 2008 08:57:27 +0000 [thread overview]
Message-ID: <47873D87.76E4.0078.0@novell.com> (raw)
The drivers picked just serve as examples (which I routinely build and
hence am able to easily verify), i.e. as before he patch doesn't change
all instances where 'const' could have been added as a result of the
base change, only where the change has a real effect (the module loader
doesn't enforce read-only section attributes at present, so only
built-in files make a real difference).
For the PCI ID tables a change like this could probably be done almost
globally in drivers/.
The cleaning up of all the invalid uses of 'const' and '__devinitdata'
on the same object could likewise be done in an almost global fashion,
although drivers/ide/pci/ seems to be the most significant violator.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/i2c/busses/i2c-piix4.c | 4 ++--
drivers/ide/pci/piix.c | 2 +-
drivers/video/aty/aty128fb.c | 2 +-
include/linux/init.h | 2 ++
4 files changed, 6 insertions(+), 4 deletions(-)
--- 2.6.24-rc7-initconst.orig/drivers/i2c/busses/i2c-piix4.c
+++ 2.6.24-rc7-initconst/drivers/i2c/busses/i2c-piix4.c
@@ -108,7 +108,7 @@ static unsigned short piix4_smba;
static struct pci_driver piix4_driver;
static struct i2c_adapter piix4_adapter;
-static struct dmi_system_id __devinitdata piix4_dmi_table[] = {
+static struct dmi_system_id __devinitconst piix4_dmi_table[] = {
{
.ident = "IBM",
.matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
@@ -388,7 +388,7 @@ static struct i2c_adapter piix4_adapter
.algo = &smbus_algorithm,
};
-static struct pci_device_id piix4_ids[] = {
+static struct pci_device_id __devinitconst piix4_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3),
.driver_data = 3 },
{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP200_SMBUS),
--- 2.6.24-rc7-initconst.orig/drivers/ide/pci/piix.c
+++ 2.6.24-rc7-initconst/drivers/ide/pci/piix.c
@@ -398,7 +398,7 @@ static void __devinit init_hwif_ich(ide_
.udma_mask = udma, \
}
-static const struct ide_port_info piix_pci_info[] __devinitdata = {
+static struct ide_port_info __devinitconst piix_pci_info[] = {
/* 0 */ DECLARE_PIIX_DEV("PIIXa", 0x00), /* no udma */
/* 1 */ DECLARE_PIIX_DEV("PIIXb", 0x00), /* no udma */
--- 2.6.24-rc7-initconst.orig/drivers/video/aty/aty128fb.c
+++ 2.6.24-rc7-initconst/drivers/video/aty/aty128fb.c
@@ -149,7 +149,7 @@ enum {
};
/* Must match above enum */
-static const char *r128_family[] __devinitdata = {
+static const char *__devinitconst r128_family[] = {
"AGP",
"PCI",
"PRO AGP",
--- 2.6.24-rc7-initconst.orig/include/linux/init.h
+++ 2.6.24-rc7-initconst/include/linux/init.h
@@ -257,11 +257,13 @@ void __init parse_early_param(void);
#ifdef CONFIG_HOTPLUG
#define __devinit
#define __devinitdata
+#define __devinitconst const
#define __devexit
#define __devexitdata
#else
#define __devinit __init
#define __devinitdata __initdata
+#define __devinitconst __initdata
#define __devexit __exit
#define __devexitdata __exitdata
#endif
next reply other threads:[~2008-01-11 8:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <47873D110200007800068158@novell.com>
2008-01-11 8:57 ` Jan Beulich [this message]
2008-01-19 1:28 ` Greg KH
2008-01-21 10:09 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47873D87.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=GregKH@novell.com \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH 3/4] introduce __devinitconst' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).