From: Haicheng Li <haicheng.li@linux.intel.com>
To: David Miller <davem@davemloft.net>
Cc: fengguang.wu@intel.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [net:master 1/9] pch_gbe_main.c:(.text+0x510370): undefined reference to `pch_ch_control_write'
Date: Sun, 07 Oct 2012 01:21:09 +0800 [thread overview]
Message-ID: <50706885.1030908@linux.intel.com> (raw)
In-Reply-To: <20121006.102132.1497404004255213029.davem@davemloft.net>
On 10/06/2012 10:21 PM, David Miller wrote:
> From: Haicheng Li<haicheng.li@linux.intel.com>
> Date: Sat, 06 Oct 2012 22:07:23 +0800
>
>> On 10/06/2012 09:22 PM, David Miller wrote:
>>> From: Haicheng Li<haicheng.li@linux.intel.com>
>>> Date: Sat, 06 Oct 2012 20:07:08 +0800
>>>
>>>> The failure is due to the CONFIG_PPS is not set there, consequently
>>>> CONFIG_PTP_1588_CLOCK can not be set as =y anyway.
>>>>
>>>> So David's patch of "da1586461e53a4dd045738cce309ab488970f0ef [1/9]
>>>> pch_gbe: Fix PTP dependencies" is buggy. Furthermore, I think using
>>>> "selects" to resolve such dependency issue is not good idea as it
>>>> won't visit the dependencies.
>>>>
>>>> David, I would still suggest to take my original patch:
>>>> https://lkml.org/lkml/2012/9/28/70
>>>>
>>>> + depends on PTP_1588_CLOCK_PCH&& (PCH_GBE=m || PTP_1588_CLOCK_PCH=y)
>>>>
>>>> or simply like:
>>>
>>> This is all very rediculous if you ask me.
>>>
>>> Why should the user have to know a detail like the underlying
>>> PTP chip type just to enable PTP on his networking card?
>>>
>>> Because that is what you are making him do with your change.
>>>
>>> Select removed the necessity of the user having to know these
>>> things.
>> However it possibly breaks the build...
>>
>> IMHO, the reason why the dependency of PCH_PTP becomes so tricky is
>> that the code of these two modules call the functions of each other
>> (bad code structure?). To fix it neatly, either we restructure the
>> code or just simply make it:
>> + depends on PTP_1588_CLOCK_PCH=y
>>
>> For PCH_GBE=m case, it does be able to pass the build test, but I'm
>> afraid it won't be smoothly workable via "insmod" due to the
>> codependency of these two when PCH_PTP is enabled.
>
> Then why does it work for IXGBE and others who use select?
They explicitly select all the possible dependencies if they are bug-free (I
didn't strictly check them).
Take IXGBE_PTP as example, it explicitly selects PPS, and also depends on
EXPERIMENTAL:
config IXGBE_PTP
bool "PTP Clock Support"
default n
depends on IXGBE && EXPERIMENTAL
select PPS
select PTP_1588_CLOCK
So if you stick to use "select" as the convention of such build issue fixing,
fengguang's build failure would be fixed by:
+ depends on EXPERIMENTAL
+ select PPS
+ select PTP_1588_CLOCK
would you prefer this way?
next prev parent reply other threads:[~2012-10-06 17:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-06 7:59 [net:master 1/9] pch_gbe_main.c:(.text+0x510370): undefined reference to `pch_ch_control_write' Fengguang Wu
2012-10-06 11:31 ` Francois Romieu
2012-10-06 13:22 ` David Miller
2012-10-06 12:07 ` Haicheng Li
2012-10-06 13:22 ` David Miller
2012-10-06 14:07 ` Haicheng Li
2012-10-06 14:21 ` David Miller
2012-10-06 17:21 ` Haicheng Li [this message]
2012-10-06 21:17 ` David Miller
2012-10-07 14:14 ` [PATCH] Fix PTP dependencies: explicitly select all the possible dependencies Haicheng Li
2012-10-07 18:54 ` David Miller
2012-10-06 14:56 ` [net:master 1/9] pch_gbe_main.c:(.text+0x510370): undefined reference to `pch_ch_control_write' Richard Cochran
[not found] ` <1349670580-11158-1-git-send-email-haicheng.lee@gmail.com>
2012-10-08 11:15 ` [PATCH] pch_pge: Fix build error by selecting all the possible dependencies Haicheng Li
[not found] ` <1349695107-19524-1-git-send-email-haicheng.lee@gmail.com>
2012-10-08 18:48 ` [PATCH] pch_gbe: " David Miller
2012-10-09 9:43 ` Haicheng Li
2012-10-09 17:51 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50706885.1030908@linux.intel.com \
--to=haicheng.li@linux.intel.com \
--cc=davem@davemloft.net \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.