Re: randconfig build error with next-20140922, in drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
From: David Miller
Date: Mon Sep 22 2014 - 13:26:15 EST
From: Jim Davis <jim.epost@xxxxxxxxx>
Date: Mon, 22 Sep 2014 10:16:26 -0700
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c: In function
> ʽpch_ptp_matchʼ:
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:130:2: error:
> implicit declaration of function ʽptp_classify_rawʼ
> [-Werror=implicit-function-declaration]
> if (ptp_classify_raw(skb) == PTP_CLASS_NONE)
> ^
> cc1: some warnings being treated as errors
> make[5]: *** [drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.o] Error 1
These dependencies are so broken.
You cannot select crap without also selecting all of that options
dependencies, and so on and so forth all the way up to the direct
and indirect dependencies that have no dependencies of their own.
The issue specifically is PCH_GBE needs NET_PTP_CLASSIFY.
PCH_GBE "selects" PTP_1588_CLOCK_PCH, which selects PTP_1588_CLOCK,
which selects NET_PTP_CLASSIFY.
But that does not reliably turn on NET_PTP_CLASSIFY. If the top
level PTP_1588_CLOCK_PCH select is what triggers, as explained
about this does not end up select'ing NET_PTP_CLASSIFY.
Said another way, 'select' does not recursively process dependencies.
You have to do them all by hand at each and every selection point.
I'm going to add the NET_PTP_CLASSIFY select to PCH_GBE's Kconfig
entry, but this is not the thing to do long term.
Long term we should be using 'depends' for all of these non-trivial
dependencies, not 'select'.