Re: [PATCH] net: ti: icss-iep: add dependency for PTP

From: Roger Quadros
Date: Mon Sep 18 2023 - 06:02:34 EST




On 16.9.2023 8.07, Randy Dunlap wrote:
When CONFIG_PTP_1588_CLOCK=m and CONFIG_TI_ICSS_IEP=y,
there are build errors when referencing PTP functions.
Fix this by making TI_ICSS_IEP depend on PTP_1588_CLOCK_OPTIONAL.
Also, since TI_ICSSG_PRUETH selects TI_ICSS_IEP and selects don't
follow dependencies, make the former also depend on
PTP_1588_CLOCK_OPTIONAL.

Fixes these build errors:

aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_get_ptp_clock_idx':
icss_iep.c:(.text+0x234): undefined reference to `ptp_clock_index'
aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_exit':
icss_iep.c:(.text+0x634): undefined reference to `ptp_clock_unregister'
aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_init':
icss_iep.c:(.text+0x1848): undefined reference to `ptp_clock_register'

Fixes: c1e0230eeaab ("net: ti: icss-iep: Add IEP driver")
Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: lore.kernel.org/r/202309151207.NPDMiINe-lkp@xxxxxxxxx
Cc: Roger Quadros <rogerq@xxxxxx>
Cc: Md Danish Anwar <danishanwar@xxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: Eric Dumazet <edumazet@xxxxxxxxxx>
Cc: Jakub Kicinski <kuba@xxxxxxxxxx>
Cc: Paolo Abeni <pabeni@xxxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx

Reviewed-by: Roger Quadros <rogerq@xxxxxxxxxx>