Skip to contentSkip to conversation

toshiba_ohci1394_dmi_table should be __devinitdata, not __devinit

PATCH In review Roland Dreier 3 participants 4 messages Oct 29, 2005 – Oct 30, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toshiba_ohci1394_dmi_table should be __devinitdata, not __devinit

I don't really understand why gcc gives the error it does, but without this patch, when building with CONFIG_HOTPLUG=n, I get errors like:

      CC      arch/x86_64/pci/../../i386/pci/fixup.o
    arch/x86_64/pci/../../i386/pci/fixup.c: In function `pci_fixup_i450nx':
    arch/x86_64/pci/../../i386/pci/fixup.c:13: error: pci_fixup_i450nx causes a section type conflict

The change is obviously correct: an array should be declared __devinitdata rather that __devinit.

arch/i386/pci/fixup.c +1 -1
@@ -398,7 +398,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI
  */
 static u16 toshiba_line_size;
 
-static struct dmi_system_id __devinit toshiba_ohci1394_dmi_table[] = {
+static struct dmi_system_id __devinitdata toshiba_ohci1394_dmi_table[] = {
 	{
 		.ident = "Toshiba PS5 based laptop",
 		.matches = {
#1 lore raw
Quoted 11 lines · Roland Dreier

I don't really understand why gcc gives the error it does, but without this patch, when building with CONFIG_HOTPLUG=n, I get errors like:

      CC      arch/x86_64/pci/../../i386/pci/fixup.o
    arch/x86_64/pci/../../i386/pci/fixup.c: In function

`pci_fixup_i450nx': arch/x86_64/pci/../../i386/pci/fixup.c:13: error:
pci_fixup_i450nx causes a section type conflict

The change is obviously correct: an array should be declared __devinitdata rather that __devinit.

Oops, yeah I think this is correct. We should also mark toshiba_line_size as __devinitdata. Patch relative to yours.

Thanks,
Jesse

arch/i386/pci/fixup.c renamed from arch/i386/pci/fixup.c.orig +1 -1
@@ -396,7 +396,7 @@
  * the wrong IRQ line, causing any devices sharing the the line it's
  * *supposed* to use to be disabled by the kernel's IRQ debug code.
  */
-static u16 toshiba_line_size;
+static u16 __devinitdata toshiba_line_size;
 
 static struct dmi_system_id __devinitdata toshiba_ohci1394_dmi_table[] = {
 	{
#2 lore raw
Quoted 10 lines · Jesse Barnes
Quoted 9 lines · Roland Dreier

I don't really understand why gcc gives the error it does, but without this patch, when building with CONFIG_HOTPLUG=n, I get errors like:

      CC      arch/x86_64/pci/../../i386/pci/fixup.o
    arch/x86_64/pci/../../i386/pci/fixup.c: In function

`pci_fixup_i450nx': arch/x86_64/pci/../../i386/pci/fixup.c:13: error:
pci_fixup_i450nx causes a section type conflict

Quoted 5 lines
Quoted 2 lines

The change is obviously correct: an array should be declared __devinitdata rather that __devinit.

Oops, yeah I think this is correct. We should also mark toshiba_line_size as __devinitdata. Patch relative to yours.

Why? Is it really worth it? 2 bytes? Ick.

It's time to just make CONFIG_HOTPLUG always on to keep messes like this from happening...

thanks,

greg k-h

#3 lore raw
Quoted 4 lines · Greg KH
Quoted 2 lines

Oops, yeah I think this is correct. We should also mark toshiba_line_size as __devinitdata. Patch relative to yours.

Why? Is it really worth it? 2 bytes? Ick.

More for consistency than anything else. No biggie.

Quoted 2 lines

It's time to just make CONFIG_HOTPLUG always on to keep messes like this from happening...

Fine with me!

Jesse