Re: [IDE] Fix build bug

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bartlomiej Zolnierkiewicz
Date: Thursday, October 25, 2007 - 2:41 pm

Hi,

On Thursday 25 October 2007, Ralf Baechle wrote:

I would prefer to not remove const from generic_chipsets[] so:

[PATCH] drivers/ide/pci/generic: fix build for CONFIG_HOTPLUG=n

It turns out that const and __{dev}initdata cannot be mixed currently
and that generic IDE PCI host driver is also affected by the same issue:

On Thursday 25 October 2007, Ralf Baechle wrote:

[ Also reported by Martijn Uffing <mp3project@sarijopen.student.utwente.nl>. ]

This patch workarounds the problem in a bit hackish way but without
removing const from generic_chipsets[] (it adds const to __setup() so
__setup_str_ide_generic_all becomes const).

Now all __{dev}initdata data in generic IDE PCI host driver are read-only
so it builds again (driver's .init.data section gets marked as READONLY).

Cc: Martijn Uffing <mp3project@sarijopen.student.utwente.nl>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/pci/generic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/ide/pci/generic.c
===================================================================
--- a/drivers/ide/pci/generic.c
+++ b/drivers/ide/pci/generic.c
@@ -49,7 +49,7 @@ static int __init ide_generic_all_on(cha
 	printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.\n");
 	return 1;
 }
-__setup("all-generic-ide", ide_generic_all_on);
+const __setup("all-generic-ide", ide_generic_all_on);
 #endif
 module_param_named(all_generic_ide, ide_generic_all, bool, 0444);
 MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers.");
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[IDE] Fix build bug, Ralf Baechle, (Thu Oct 25, 6:53 am)
Re: [IDE] Fix build bug, Sam Ravnborg, (Thu Oct 25, 7:13 am)
Re: [IDE] Fix build bug, Ralf Baechle, (Thu Oct 25, 7:13 am)
Re: [IDE] Fix build bug, Maciej W. Rozycki, (Thu Oct 25, 7:47 am)
Re: [IDE] Fix build bug, Ralf Baechle, (Thu Oct 25, 9:05 am)
Re: [IDE] Fix build bug, Maciej W. Rozycki, (Thu Oct 25, 10:12 am)
Re: [IDE] Fix build bug, Bartlomiej Zolnierki ..., (Thu Oct 25, 2:41 pm)
Re: [IDE] Fix build bug, Bartlomiej Zolnierki ..., (Thu Oct 25, 2:52 pm)
Re: [IDE] Fix build bug, Denys Vlasenko, (Tue Oct 30, 4:34 am)
Re: [IDE] Fix build bug, Ralf Baechle, (Tue Oct 30, 5:41 am)
Re: [IDE] Fix build bug, Bartlomiej Zolnierki ..., (Tue Oct 30, 1:30 pm)
Re: [IDE] Fix build bug, Denys Vlasenko, (Thu Nov 1, 11:43 am)
Re: [IDE] Fix build bug, Ralf Baechle, (Fri Nov 2, 5:34 am)