lkml.org 
[lkml]   [2020]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH net v3] net: ethernet: ti: fix build and remove TI_CPTS_MOD workaround
On Fri, May 8, 2020 at 11:59 AM Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
>
> From: Clay McClure <clay@daemons.net>
>
> My recent commit b6d49cab44b5 ("net: Make PTP-specific drivers depend on
> PTP_1588_CLOCK") exposes a missing dependency in defconfigs that select
> TI_CPTS without selecting PTP_1588_CLOCK, leading to linker errors of the
> form:
>
> drivers/net/ethernet/ti/cpsw.o: in function `cpsw_ndo_stop':
> cpsw.c:(.text+0x680): undefined reference to `cpts_unregister'
> ...
>
> That's because TI_CPTS_MOD (which is the symbol gating the _compilation_ of
> cpts.c) now depends on PTP_1588_CLOCK, and so is not enabled in these
> configurations, but TI_CPTS (which is the symbol gating _calls_ to the cpts
> functions) _is_ enabled. So we end up compiling calls to functions that
> don't exist, resulting in the linker errors.
>
> This patch fixes build errors and restores previous behavior by:
> - ensure PTP_1588_CLOCK=y in TI specific configs and CPTS will be built
> - use IS_REACHABLE(CONFIG_TI_CPTS) in code instead of IS_ENABLED()

I don't understand what IS_REACHABLE() is needed for once all the other
changes are in place. I'd hope we can avoid that. Do you still see
failures without
that or is it just a precaution. I can do some randconfig testing on your patch
to see what else might be needed to avoid IS_REACHABLE().

Arnd

\
 
 \ /
  Last update: 2020-05-08 12:11    [W:0.056 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site