Message ID | 20241104090750.12942-5-divya.koppera@microchip.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Add ptp library for Microchip phys | expand |
Hi Divya, kernel test robot noticed the following build errors: [auto build test ERROR on net-next/main] url: https://github.com/intel-lab-lkp/linux/commits/Divya-Koppera/net-phy-microchip_ptp-Add-header-file-for-Microchip-ptp-library/20241104-171132 base: net-next/main patch link: https://lore.kernel.org/r/20241104090750.12942-5-divya.koppera%40microchip.com patch subject: [PATCH net-next 4/5] net: phy: Makefile: Add makefile support for ptp in Microchip phys config: i386-randconfig-052-20241105 (https://download.01.org/0day-ci/archive/20241105/202411050939.88HGuanR-lkp@intel.com/config) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241105/202411050939.88HGuanR-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411050939.88HGuanR-lkp@intel.com/ All error/warnings (new ones prefixed by >>): In file included from drivers/net/phy/microchip_ptp.c:4: >> drivers/net/phy/microchip_ptp.h:197:60: warning: declaration of 'struct phy_device' will not be visible outside of this function [-Wvisibility] 197 | static inline struct mchp_ptp_clock *mchp_ptp_probe(struct phy_device *phydev, | ^ >> drivers/net/phy/microchip_ptp.h:198:11: error: unknown type name 'u8' 198 | u8 mmd, u16 clk_base, | ^ >> drivers/net/phy/microchip_ptp.h:198:19: error: unknown type name 'u16' 198 | u8 mmd, u16 clk_base, | ^ drivers/net/phy/microchip_ptp.h:199:11: error: unknown type name 'u16' 199 | u16 port_base) | ^ drivers/net/phy/microchip_ptp.h:205:12: error: unknown type name 'u16' 205 | u16 reg, u16 val, bool enable) | ^ drivers/net/phy/microchip_ptp.h:205:21: error: unknown type name 'u16' 205 | u16 reg, u16 val, bool enable) | ^ >> drivers/net/phy/microchip_ptp.h:205:30: error: unknown type name 'bool' 205 | u16 reg, u16 val, bool enable) | ^ >> drivers/net/phy/microchip_ptp.h:210:15: error: unknown type name 'irqreturn_t' 210 | static inline irqreturn_t mchp_ptp_handle_interrupt(struct mchp_ptp_clock *ptp_clock) | ^ >> drivers/net/phy/microchip_ptp.h:212:9: error: use of undeclared identifier 'IRQ_NONE' 212 | return IRQ_NONE; | ^ >> drivers/net/phy/microchip_ptp.c:7:16: warning: declaration of 'enum ptp_fifo_dir' will not be visible outside of this function [-Wvisibility] 7 | enum ptp_fifo_dir dir) | ^ >> drivers/net/phy/microchip_ptp.c:7:29: error: variable has incomplete type 'enum ptp_fifo_dir' 7 | enum ptp_fifo_dir dir) | ^ drivers/net/phy/microchip_ptp.c:7:16: note: forward declaration of 'enum ptp_fifo_dir' 7 | enum ptp_fifo_dir dir) | ^ >> drivers/net/phy/microchip_ptp.c:9:39: error: incomplete definition of type 'struct mchp_ptp_clock' 9 | struct phy_device *phydev = ptp_clock->phydev; | ~~~~~~~~~^ drivers/net/phy/microchip_ptp.h:197:22: note: forward declaration of 'struct mchp_ptp_clock' 197 | static inline struct mchp_ptp_clock *mchp_ptp_probe(struct phy_device *phydev, | ^ >> drivers/net/phy/microchip_ptp.c:12:22: error: use of undeclared identifier 'MCHP_PTP_FIFO_SIZE' 12 | for (int i = 0; i < MCHP_PTP_FIFO_SIZE; ++i) { | ^ >> drivers/net/phy/microchip_ptp.c:13:8: error: call to undeclared function 'phy_read_mmd'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 13 | rc = phy_read_mmd(phydev, PTP_MMD(ptp_clock), | ^ >> drivers/net/phy/microchip_ptp.c:13:29: error: call to undeclared function 'PTP_MMD'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 13 | rc = phy_read_mmd(phydev, PTP_MMD(ptp_clock), | ^ >> drivers/net/phy/microchip_ptp.c:15:7: error: call to undeclared function 'MCHP_PTP_TX_MSG_HEADER2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 15 | MCHP_PTP_TX_MSG_HEADER2(BASE_PORT(ptp_clock)) : | ^ >> drivers/net/phy/microchip_ptp.c:15:31: error: call to undeclared function 'BASE_PORT'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 15 | MCHP_PTP_TX_MSG_HEADER2(BASE_PORT(ptp_clock)) : | ^ >> drivers/net/phy/microchip_ptp.c:16:7: error: call to undeclared function 'MCHP_PTP_RX_MSG_HEADER2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 16 | MCHP_PTP_RX_MSG_HEADER2(BASE_PORT(ptp_clock))); | ^ >> drivers/net/phy/microchip_ptp.c:14:14: error: use of undeclared identifier 'PTP_EGRESS_FIFO' 14 | dir == PTP_EGRESS_FIFO ? | ^ drivers/net/phy/microchip_ptp.c:20:9: error: call to undeclared function 'phy_read_mmd'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 20 | return phy_read_mmd(phydev, PTP_MMD(ptp_clock), | ^ drivers/net/phy/microchip_ptp.c:20:30: error: call to undeclared function 'PTP_MMD'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 20 | return phy_read_mmd(phydev, PTP_MMD(ptp_clock), | ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 2 warnings and 20 errors generated. vim +/u8 +198 drivers/net/phy/microchip_ptp.h ca38715fe9dd463 Divya Koppera 2024-11-04 196 ca38715fe9dd463 Divya Koppera 2024-11-04 @197 static inline struct mchp_ptp_clock *mchp_ptp_probe(struct phy_device *phydev, ca38715fe9dd463 Divya Koppera 2024-11-04 @198 u8 mmd, u16 clk_base, ca38715fe9dd463 Divya Koppera 2024-11-04 199 u16 port_base) ca38715fe9dd463 Divya Koppera 2024-11-04 200 { ca38715fe9dd463 Divya Koppera 2024-11-04 201 return 0; ca38715fe9dd463 Divya Koppera 2024-11-04 202 } ca38715fe9dd463 Divya Koppera 2024-11-04 203 ca38715fe9dd463 Divya Koppera 2024-11-04 204 static inline int mchp_config_ptp_intr(struct mchp_ptp_clock *ptp_clock, ca38715fe9dd463 Divya Koppera 2024-11-04 @205 u16 reg, u16 val, bool enable) ca38715fe9dd463 Divya Koppera 2024-11-04 206 { ca38715fe9dd463 Divya Koppera 2024-11-04 207 return 0; ca38715fe9dd463 Divya Koppera 2024-11-04 208 } ca38715fe9dd463 Divya Koppera 2024-11-04 209 ca38715fe9dd463 Divya Koppera 2024-11-04 @210 static inline irqreturn_t mchp_ptp_handle_interrupt(struct mchp_ptp_clock *ptp_clock) ca38715fe9dd463 Divya Koppera 2024-11-04 211 { ca38715fe9dd463 Divya Koppera 2024-11-04 @212 return IRQ_NONE; ca38715fe9dd463 Divya Koppera 2024-11-04 213 } ca38715fe9dd463 Divya Koppera 2024-11-04 214
Hi Divya, kernel test robot noticed the following build errors: [auto build test ERROR on net-next/main] url: https://github.com/intel-lab-lkp/linux/commits/Divya-Koppera/net-phy-microchip_ptp-Add-header-file-for-Microchip-ptp-library/20241104-171132 base: net-next/main patch link: https://lore.kernel.org/r/20241104090750.12942-5-divya.koppera%40microchip.com patch subject: [PATCH net-next 4/5] net: phy: Makefile: Add makefile support for ptp in Microchip phys config: powerpc64-randconfig-r063-20241105 (https://download.01.org/0day-ci/archive/20241105/202411051137.XUgYrwtP-lkp@intel.com/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241105/202411051137.XUgYrwtP-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411051137.XUgYrwtP-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/net/phy/microchip_ptp.c:4: drivers/net/phy/microchip_ptp.h:197:60: warning: declaration of 'struct phy_device' will not be visible outside of this function [-Wvisibility] static inline struct mchp_ptp_clock *mchp_ptp_probe(struct phy_device *phydev, ^ drivers/net/phy/microchip_ptp.h:198:11: error: unknown type name 'u8' u8 mmd, u16 clk_base, ^ drivers/net/phy/microchip_ptp.h:198:19: error: unknown type name 'u16' u8 mmd, u16 clk_base, ^ drivers/net/phy/microchip_ptp.h:199:11: error: unknown type name 'u16' u16 port_base) ^ drivers/net/phy/microchip_ptp.h:205:12: error: unknown type name 'u16' u16 reg, u16 val, bool enable) ^ drivers/net/phy/microchip_ptp.h:205:21: error: unknown type name 'u16' u16 reg, u16 val, bool enable) ^ drivers/net/phy/microchip_ptp.h:205:30: error: unknown type name 'bool' u16 reg, u16 val, bool enable) ^ drivers/net/phy/microchip_ptp.h:210:15: error: unknown type name 'irqreturn_t' static inline irqreturn_t mchp_ptp_handle_interrupt(struct mchp_ptp_clock *ptp_clock) ^ drivers/net/phy/microchip_ptp.h:212:9: error: use of undeclared identifier 'IRQ_NONE' return IRQ_NONE; ^ drivers/net/phy/microchip_ptp.c:7:16: warning: declaration of 'enum ptp_fifo_dir' will not be visible outside of this function [-Wvisibility] enum ptp_fifo_dir dir) ^ drivers/net/phy/microchip_ptp.c:7:29: error: variable has incomplete type 'enum ptp_fifo_dir' enum ptp_fifo_dir dir) ^ drivers/net/phy/microchip_ptp.c:7:16: note: forward declaration of 'enum ptp_fifo_dir' enum ptp_fifo_dir dir) ^ drivers/net/phy/microchip_ptp.c:9:39: error: incomplete definition of type 'struct mchp_ptp_clock' struct phy_device *phydev = ptp_clock->phydev; ~~~~~~~~~^ drivers/net/phy/microchip_ptp.h:197:22: note: forward declaration of 'struct mchp_ptp_clock' static inline struct mchp_ptp_clock *mchp_ptp_probe(struct phy_device *phydev, ^ drivers/net/phy/microchip_ptp.c:12:22: error: use of undeclared identifier 'MCHP_PTP_FIFO_SIZE' for (int i = 0; i < MCHP_PTP_FIFO_SIZE; ++i) { ^ >> drivers/net/phy/microchip_ptp.c:13:8: error: implicit declaration of function 'phy_read_mmd' is invalid in C99 [-Werror,-Wimplicit-function-declaration] rc = phy_read_mmd(phydev, PTP_MMD(ptp_clock), ^ >> drivers/net/phy/microchip_ptp.c:13:29: error: implicit declaration of function 'PTP_MMD' is invalid in C99 [-Werror,-Wimplicit-function-declaration] rc = phy_read_mmd(phydev, PTP_MMD(ptp_clock), ^ drivers/net/phy/microchip_ptp.c:14:14: error: use of undeclared identifier 'PTP_EGRESS_FIFO' dir == PTP_EGRESS_FIFO ? ^ >> drivers/net/phy/microchip_ptp.c:15:7: error: implicit declaration of function 'MCHP_PTP_TX_MSG_HEADER2' is invalid in C99 [-Werror,-Wimplicit-function-declaration] MCHP_PTP_TX_MSG_HEADER2(BASE_PORT(ptp_clock)) : ^ >> drivers/net/phy/microchip_ptp.c:15:31: error: implicit declaration of function 'BASE_PORT' is invalid in C99 [-Werror,-Wimplicit-function-declaration] MCHP_PTP_TX_MSG_HEADER2(BASE_PORT(ptp_clock)) : ^ >> drivers/net/phy/microchip_ptp.c:16:7: error: implicit declaration of function 'MCHP_PTP_RX_MSG_HEADER2' is invalid in C99 [-Werror,-Wimplicit-function-declaration] MCHP_PTP_RX_MSG_HEADER2(BASE_PORT(ptp_clock))); ^ drivers/net/phy/microchip_ptp.c:16:7: note: did you mean 'MCHP_PTP_TX_MSG_HEADER2'? drivers/net/phy/microchip_ptp.c:15:7: note: 'MCHP_PTP_TX_MSG_HEADER2' declared here MCHP_PTP_TX_MSG_HEADER2(BASE_PORT(ptp_clock)) : ^ drivers/net/phy/microchip_ptp.c:20:9: error: implicit declaration of function 'phy_read_mmd' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return phy_read_mmd(phydev, PTP_MMD(ptp_clock), ^ drivers/net/phy/microchip_ptp.c:20:30: error: implicit declaration of function 'PTP_MMD' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return phy_read_mmd(phydev, PTP_MMD(ptp_clock), ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 2 warnings and 20 errors generated. vim +/phy_read_mmd +13 drivers/net/phy/microchip_ptp.c cf630bd2326111 Divya Koppera 2024-11-04 5 cf630bd2326111 Divya Koppera 2024-11-04 6 static int mchp_ptp_flush_fifo(struct mchp_ptp_clock *ptp_clock, cf630bd2326111 Divya Koppera 2024-11-04 7 enum ptp_fifo_dir dir) cf630bd2326111 Divya Koppera 2024-11-04 8 { cf630bd2326111 Divya Koppera 2024-11-04 9 struct phy_device *phydev = ptp_clock->phydev; cf630bd2326111 Divya Koppera 2024-11-04 10 int rc; cf630bd2326111 Divya Koppera 2024-11-04 11 cf630bd2326111 Divya Koppera 2024-11-04 12 for (int i = 0; i < MCHP_PTP_FIFO_SIZE; ++i) { cf630bd2326111 Divya Koppera 2024-11-04 @13 rc = phy_read_mmd(phydev, PTP_MMD(ptp_clock), cf630bd2326111 Divya Koppera 2024-11-04 14 dir == PTP_EGRESS_FIFO ? cf630bd2326111 Divya Koppera 2024-11-04 @15 MCHP_PTP_TX_MSG_HEADER2(BASE_PORT(ptp_clock)) : cf630bd2326111 Divya Koppera 2024-11-04 @16 MCHP_PTP_RX_MSG_HEADER2(BASE_PORT(ptp_clock))); cf630bd2326111 Divya Koppera 2024-11-04 17 if (rc < 0) cf630bd2326111 Divya Koppera 2024-11-04 18 return rc; cf630bd2326111 Divya Koppera 2024-11-04 19 } cf630bd2326111 Divya Koppera 2024-11-04 20 return phy_read_mmd(phydev, PTP_MMD(ptp_clock), cf630bd2326111 Divya Koppera 2024-11-04 21 MCHP_PTP_INT_STS(BASE_PORT(ptp_clock))); cf630bd2326111 Divya Koppera 2024-11-04 22 } cf630bd2326111 Divya Koppera 2024-11-04 23
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile index 90f886844381..58a4a2953930 100644 --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile @@ -80,6 +80,7 @@ obj-$(CONFIG_MESON_GXL_PHY) += meson-gxl.o obj-$(CONFIG_MICREL_KS8995MA) += spi_ks8995.o obj-$(CONFIG_MICREL_PHY) += micrel.o obj-$(CONFIG_MICROCHIP_PHY) += microchip.o +obj-$(CONFIG_MICROCHIP_PHYPTP) += microchip_ptp.o obj-$(CONFIG_MICROCHIP_T1_PHY) += microchip_t1.o obj-$(CONFIG_MICROCHIP_T1S_PHY) += microchip_t1s.o obj-$(CONFIG_MICROSEMI_PHY) += mscc/
Add makefile support for ptp library. Signed-off-by: Divya Koppera <divya.koppera@microchip.com> --- drivers/net/phy/Makefile | 1 + 1 file changed, 1 insertion(+)