linux_dsm_epyc7002/drivers/net/ethernet/microchip
Arnd Bergmann 9dc502d797 net: lan743x: fix building without CONFIG_PTP_1588_CLOCK
Building without CONFIG_PTP_1588_CLOCK results in multiple failures,
this was obviously not well tested:

drivers/net/ethernet/microchip/lan743x_ptp.c: In function 'lan743x_ptp_isr':
drivers/net/ethernet/microchip/lan743x_ptp.c:781:28: error: 'struct lan743x_ptp' has no member named 'ptp_clock'; did you mean 'tx_ts_lock'?
   ptp_schedule_worker(ptp->ptp_clock, 0);
                            ^~~~~~~~~
                            tx_ts_lock
drivers/net/ethernet/microchip/lan743x_ptp.c: In function 'lan743x_ptp_open':
drivers/net/ethernet/microchip/lan743x_ptp.c:879:6: error: unused variable 'ret' [-Werror=unused-variable]
  int ret = -ENODEV;
      ^~~
At top level:
drivers/net/ethernet/microchip/lan743x_ptp.c:63:13: error: 'lan743x_ptp_tx_ts_enqueue_ts' defined but not used [-Werror=unused-function]
 static void lan743x_ptp_tx_ts_enqueue_ts(struct lan743x_adapter *adapter,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
drivers/net/ethernet/microchip/lan743x_ethtool.c: In function 'lan743x_ethtool_get_ts_info':
drivers/net/ethernet/microchip/lan743x_ethtool.c:558:19: error: 'struct lan743x_ptp' has no member named 'ptp_clock'; did you mean 'tx_ts_lock'?

Those #ifdef checks are hard to get right, replace them all with
IS_ENABLED() checks that leave the same code visible to the compiler
but let it optimize out the unused bits based on the configuration.

Fixes: 07624df1c9 ("lan743x: lan743x: Add PTP support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-13 20:43:47 -07:00
..
enc28j60_hw.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
enc28j60.c net: microchip: enc28j60: use new api ethtool_{get|set}_link_ksettings 2017-02-12 22:32:17 -05:00
encx24j600_hw.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
encx24j600-regmap.c encx24j600: Fix some checkstyle warnings 2016-12-16 13:31:47 -05:00
encx24j600.c net: microchip: encx24j600: use new api ethtool_{get|set}_link_ksettings 2017-02-12 22:32:17 -05:00
Kconfig net: lan743x: select CRC16 2018-08-13 20:43:32 -07:00
lan743x_ethtool.c lan743x: lan743x: Add PTP support 2018-08-11 11:42:18 -07:00
lan743x_ethtool.h lan743x: Add support for ethtool get_drvinfo 2018-07-23 14:09:18 -07:00
lan743x_main.c lan743x: lan743x: Add PTP support 2018-08-11 11:42:18 -07:00
lan743x_main.h lan743x: lan743x: Add PTP support 2018-08-11 11:42:18 -07:00
lan743x_ptp.c net: lan743x: fix building without CONFIG_PTP_1588_CLOCK 2018-08-13 20:43:47 -07:00
lan743x_ptp.h net: lan743x: fix building without CONFIG_PTP_1588_CLOCK 2018-08-13 20:43:47 -07:00
Makefile lan743x: lan743x: Add PTP support 2018-08-11 11:42:18 -07:00