linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: cavium: Fix build errors due to 'imply CAVIUM_PTP'
@ 2020-04-02 13:23 YueHaibing
  2020-04-02 14:01 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2020-04-02 13:23 UTC (permalink / raw)
  To: davem, yuehaibing, nishadkamdar, nico, masahiroy
  Cc: netdev, linux-kernel, gakula

If CAVIUM_PTP is m and THUNDER_NIC_VF is y, build fails:

drivers/net/ethernet/cavium/thunder/nicvf_main.o: In function 'nicvf_remove':
nicvf_main.c:(.text+0x1f0): undefined reference to 'cavium_ptp_put'
drivers/net/ethernet/cavium/thunder/nicvf_main.o: In function `nicvf_probe':
nicvf_main.c:(.text+0x557c): undefined reference to 'cavium_ptp_get'

THUNDER_NIC_VF imply CAVIUM_PTP, which allow the config now,
Use IS_REACHABLE() to avoid the vmlinux link error for this case.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: def2fbffe62c ("kconfig: allow symbols implied by y to become m")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/cavium/common/cavium_ptp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cavium/common/cavium_ptp.h b/drivers/net/ethernet/cavium/common/cavium_ptp.h
index a04eccbc78e8..1e0ffe8f4152 100644
--- a/drivers/net/ethernet/cavium/common/cavium_ptp.h
+++ b/drivers/net/ethernet/cavium/common/cavium_ptp.h
@@ -24,7 +24,7 @@ struct cavium_ptp {
 	struct ptp_clock *ptp_clock;
 };
 
-#if IS_ENABLED(CONFIG_CAVIUM_PTP)
+#if IS_REACHABLE(CONFIG_CAVIUM_PTP)
 
 struct cavium_ptp *cavium_ptp_get(void);
 void cavium_ptp_put(struct cavium_ptp *ptp);
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net: cavium: Fix build errors due to 'imply CAVIUM_PTP'
  2020-04-02 13:23 [PATCH net] net: cavium: Fix build errors due to 'imply CAVIUM_PTP' YueHaibing
@ 2020-04-02 14:01 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-04-02 14:01 UTC (permalink / raw)
  To: yuehaibing; +Cc: nishadkamdar, nico, masahiroy, netdev, linux-kernel, gakula

From: YueHaibing <yuehaibing@huawei.com>
Date: Thu, 2 Apr 2020 21:23:44 +0800

> If CAVIUM_PTP is m and THUNDER_NIC_VF is y, build fails:
> 
> drivers/net/ethernet/cavium/thunder/nicvf_main.o: In function 'nicvf_remove':
> nicvf_main.c:(.text+0x1f0): undefined reference to 'cavium_ptp_put'
> drivers/net/ethernet/cavium/thunder/nicvf_main.o: In function `nicvf_probe':
> nicvf_main.c:(.text+0x557c): undefined reference to 'cavium_ptp_get'
> 
> THUNDER_NIC_VF imply CAVIUM_PTP, which allow the config now,
> Use IS_REACHABLE() to avoid the vmlinux link error for this case.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: def2fbffe62c ("kconfig: allow symbols implied by y to become m")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-02 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 13:23 [PATCH net] net: cavium: Fix build errors due to 'imply CAVIUM_PTP' YueHaibing
2020-04-02 14:01 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).