2007-06-26 20:24:28

by Randy Dunlap

[permalink] [raw]
Subject: EDD build error

Hi,

CONFIG_EDD does not depend on PCI, but edd.c uses pci_* interface
functions, resulting in:

CC [M] drivers/firmware/edd.o
drivers/firmware/edd.c: In function 'edd_get_pci_dev':
drivers/firmware/edd.c:672: warning: implicit declaration of function 'pci_get_bus_and_slot'
drivers/firmware/edd.c:673: warning: return makes pointer from integer without a cast
...
ERROR: "pci_get_bus_and_slot" [drivers/firmware/edd.ko] undefined!
make[1]: *** [__modpost] Error 1


Should EDD depend on PCI or should some parts of edd.c be stubbed?


(This is in 2.6.22-rc4-mm2 FWIW.)

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***


2007-06-26 22:17:18

by Torsten Duwe

[permalink] [raw]
Subject: Re: EDD build error

On Tuesday 26 June 2007, Randy Dunlap wrote:

> ERROR: "pci_get_bus_and_slot" [drivers/firmware/edd.ko] undefined!
> make[1]: *** [__modpost] Error 1
>
> Should EDD depend on PCI or should some parts of edd.c be stubbed?

I'd suggest to simply stub it, as attached (untested, as my crap-Awarded BIOS
only has 2.1). It may not be nice to pull in the PCI defs and then return NULL
regardless, but should be safe in your case. Does that work?

Torsten


Attachments:
(No filename) (451.00 B)
EDD-diff (603.00 B)
Download all attachments

2007-06-26 22:32:39

by Randy Dunlap

[permalink] [raw]
Subject: Re: EDD build error

On Wed, 27 Jun 2007 00:16:44 +0200 Torsten Duwe wrote:

> On Tuesday 26 June 2007, Randy Dunlap wrote:
>
> > ERROR: "pci_get_bus_and_slot" [drivers/firmware/edd.ko] undefined!
> > make[1]: *** [__modpost] Error 1
> >
> > Should EDD depend on PCI or should some parts of edd.c be stubbed?
>
> I'd suggest to simply stub it, as attached (untested, as my crap-Awarded BIOS
> only has 2.1). It may not be nice to pull in the PCI defs and then return NULL
> regardless, but should be safe in your case. Does that work?


>From original email:
(This is in 2.6.22-rc4-mm2 FWIW.)

so quilt+patch says:

Applying patch EDD.diff
patching file drivers/firmware/edd.c
Hunk #1 FAILED at 669.
1 out of 1 hunk FAILED -- rejects in file drivers/firmware/edd.c
Patch EDD.diff does not apply (enforce with -f)


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

2007-06-26 22:44:28

by Torsten Duwe

[permalink] [raw]
Subject: Re: EDD build error

On Wednesday 27 June 2007, Randy Dunlap wrote:
>
> From original email:
> (This is in 2.6.22-rc4-mm2 FWIW.)

Sorry. This one should be better.
I've moved the edd_info, to avoid the -Wunused.

Torsten


Attachments:
(No filename) (201.00 B)
EDD-diff (814.00 B)
Download all attachments

2007-06-26 23:26:39

by Randy Dunlap

[permalink] [raw]
Subject: Re: EDD build error

On Wed, 27 Jun 2007 00:44:02 +0200 Torsten Duwe wrote:

> On Wednesday 27 June 2007, Randy Dunlap wrote:
> >
> > From original email:
> > (This is in 2.6.22-rc4-mm2 FWIW.)
>
> Sorry. This one should be better.
> I've moved the edd_info, to avoid the -Wunused.

Yes, that one works fine. Thanks.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***