2005-10-29 04:50:42

by Roland Dreier

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Roland Dreier <[email protected]>

diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c
--- a/arch/i386/pci/fixup.c
+++ b/arch/i386/pci/fixup.c
@@ -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 = {


2005-10-29 14:43:55

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH] toshiba_ohci1394_dmi_table should be __devinitdata, not __devinit

On Friday, October 28, 2005 9:50 pm, Roland Dreier wrote:
> 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

Signed-off-by: Jesse Barnes <[email protected]>


Attachments:
(No filename) (736.00 B)
toshiba-quirk-devinitdata.patch (477.00 B)
Download all attachments

2005-10-29 19:58:23

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] toshiba_ohci1394_dmi_table should be __devinitdata, not __devinit

On Sat, Oct 29, 2005 at 07:43:59AM -0700, Jesse Barnes wrote:
> On Friday, October 28, 2005 9:50 pm, Roland Dreier wrote:
> > 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.

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

2005-10-30 04:19:18

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH] toshiba_ohci1394_dmi_table should be __devinitdata, not __devinit

On Saturday, October 29, 2005 12:57 pm, Greg KH wrote:
> > 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.

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

Fine with me!

Jesse