2016-10-06 13:57:44

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH] ethernet: qualcomm: QCOM_EMAC should depend on HAS_DMA

If NO_DMA=y:

drivers/built-in.o: In function `emac_probe':
emac.c:(.text+0x3780b8): undefined reference to `bad_dma_ops'
emac.c:(.text+0x3780e2): undefined reference to `bad_dma_ops'
emac.c:(.text+0x378112): undefined reference to `bad_dma_ops'
emac.c:(.text+0x378146): undefined reference to `bad_dma_ops'
emac.c:(.text+0x37816e): undefined reference to `bad_dma_ops'
drivers/built-in.o:emac.c:(.text+0x37819a): more undefined references to `bad_dma_ops' follow

Add a dependency on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <[email protected]>
---
drivers/net/ethernet/qualcomm/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/qualcomm/Kconfig b/drivers/net/ethernet/qualcomm/Kconfig
index 9ba568db576fb0e6..fe94d2baeaf26aa6 100644
--- a/drivers/net/ethernet/qualcomm/Kconfig
+++ b/drivers/net/ethernet/qualcomm/Kconfig
@@ -26,6 +26,7 @@ config QCA7000

config QCOM_EMAC
tristate "Qualcomm Technologies, Inc. EMAC Gigabit Ethernet support"
+ depends on HAS_DMA
select CRC32
select PHYLIB
---help---
--
1.9.1


2016-10-06 14:06:50

by Timur Tabi

[permalink] [raw]
Subject: Re: [PATCH] ethernet: qualcomm: QCOM_EMAC should depend on HAS_DMA

Geert Uytterhoeven wrote:
> config QCOM_EMAC
> tristate "Qualcomm Technologies, Inc. EMAC Gigabit Ethernet support"
> + depends on HAS_DMA

I think it needs to depend on HAS_IOMEM as well, to fix this error in
arch/um:

drivers/net/ethernet/qualcomm/emac/emac.c: In function 'emac_remove':
>> drivers/net/ethernet/qualcomm/emac/emac.c:727:3: error: implicit
declaration of function 'iounmap' [-Werror=implicit-function-declaration]
iounmap(adpt->phy.digital);

--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

2016-10-06 14:10:29

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH] ethernet: qualcomm: QCOM_EMAC should depend on HAS_DMA

On Thu, Oct 6, 2016 at 4:06 PM, Timur Tabi <[email protected]> wrote:
> Geert Uytterhoeven wrote:
>>
>> config QCOM_EMAC
>> tristate "Qualcomm Technologies, Inc. EMAC Gigabit Ethernet
>> support"
>> + depends on HAS_DMA
>
>
> I think it needs to depend on HAS_IOMEM as well, to fix this error in
> arch/um:
>
> drivers/net/ethernet/qualcomm/emac/emac.c: In function 'emac_remove':
>>> drivers/net/ethernet/qualcomm/emac/emac.c:727:3: error: implicit
>>> declaration of function 'iounmap' [-Werror=implicit-function-declaration]
> iounmap(adpt->phy.digital);

Probably, I don't do UML allmodconfig builds.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2016-10-06 14:12:13

by Timur Tabi

[permalink] [raw]
Subject: Re: [PATCH] ethernet: qualcomm: QCOM_EMAC should depend on HAS_DMA

Geert Uytterhoeven wrote:
> Probably, I don't do UML allmodconfig builds.
>
> Gr{oetje,eeting}s,

Would you mind submitting another version of your patch that includes
HAS_DMA and HAS_IOMEM, so that both build breaks can be fixed in one shot?

--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

2016-10-06 14:45:20

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH] ethernet: qualcomm: QCOM_EMAC should depend on HAS_DMA

On Thu, Oct 6, 2016 at 4:12 PM, Timur Tabi <[email protected]> wrote:
> Geert Uytterhoeven wrote:
>>
>> Probably, I don't do UML allmodconfig builds.
>>
>> Gr{oetje,eeting}s,
>
>
> Would you mind submitting another version of your patch that includes
> HAS_DMA and HAS_IOMEM, so that both build breaks can be fixed in one shot?

Done.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds