ionic: fix ptp support config breakage
Subsystems (3)
PATCH v2 1/1 ionic: fix ptp support config breakage
Driver link failed with undefined references in some kernel config variations.
v2 - added Fixes tag
--- drivers/net/ethernet/pensando/ionic/Makefile | 3 +-- drivers/net/ethernet/pensando/ionic/ionic_phc.c | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/pensando/ionic/Makefile +1 -2
@@ -5,5 +5,4 @@ obj-$(CONFIG_IONIC) := ionic.o ionic-y := ionic_main.o ionic_bus_pci.o ionic_devlink.o ionic_dev.o \ ionic_debugfs.o ionic_lif.o ionic_rx_filter.o ionic_ethtool.o \ - ionic_txrx.o ionic_stats.o ionic_fw.o -ionic-$(CONFIG_PTP_1588_CLOCK) += ionic_phc.o + ionic_txrx.o ionic_stats.o ionic_fw.o ionic_phc.o
drivers/net/ethernet/pensando/ionic/ionic_phc.c +3 -0
@@ -1,6 +1,8 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2017 - 2021 Pensando Systems, Inc */ +#if IS_ENABLED (CONFIG_PTP_1588_CLOCK ) +#include <linux/netdevice.h> #include <linux/etherdevice.h>
@@ -613,3 +615,4 @@ void ionic_lif_free_phc(struct ionic_lif *lif)devm_kfree (lif->ionic->dev, lif->phc); lif->phc = NULL; } +#endif /* IS_ENABLED(CONFIG_PTP_1588_CLOCK) */
Signature · 1 line
2.17.1
Quoted 4 lines · Shannon Nelson
Driver link failed with undefined references in some kernel config variations.
v2 - added Fixes tag
Changelogs should be below "---" line.
We don't need them in commit message history.
Quoted 25 lines
Fixes 61db421da31b ("ionic: link in the new hw timestamp code")Reported-by kernel test robot <[email protected]>Signed-off-by Shannon Nelson <[email protected]>--- drivers/net/ethernet/pensando/ionic/Makefile | 3 +-- drivers/net/ethernet/pensando/ionic/ionic_phc.c | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-)drivers/net/ethernet/pensando/ionic/Makefile +1
-2@@ -5,5 +5,4 @@ obj-$(CONFIG_IONIC) := ionic.o ionic-y := ionic_main.o ionic_bus_pci.o ionic_devlink.o ionic_dev.o \ ionic_debugfs.o ionic_lif.o ionic_rx_filter.o ionic_ethtool.o \ - ionic_txrx.o ionic_stats.o ionic_fw.o -ionic-$(CONFIG_PTP_1588_CLOCK) += ionic_phc.o + ionic_txrx.o ionic_stats.o ionic_fw.o ionic_phc.odrivers/net/ethernet/pensando/ionic/ionic_phc.c +0
-0
drivers/net/ethernet/pensando/ionic/ionic_phc.c line 4
Quoted 4 lines
drivers/net/ethernet/pensando/ionic/ionic_phc.c +1
-0@@ -1,6 +1,8 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2017 - 2021 Pensando Systems, Inc */ +#if IS_ENABLED (CONFIG_PTP_1588_CLOCK )
I'm not sure, but think that IS_ENABLED() is intended to be used inside functions/macros as boolean expression.
For other places like this, "#if CONFIG_PTP_1588_CLOCK" is better fit.
Thanks
Quoted 37 lines · Leon Romanovsky
Quoted 4 lines · Shannon Nelson
Driver link failed with undefined references in some kernel config variations.
v2 - added Fixes tag
Changelogs should be below "---" line.
We don't need them in commit message history.Quoted 28 lines
Fixes 61db421da31b ("ionic: link in the new hw timestamp code")Reported-by kernel test robot <[email protected]>Signed-off-by Shannon Nelson <[email protected]>--- drivers/net/ethernet/pensando/ionic/Makefile | 3 +-- drivers/net/ethernet/pensando/ionic/ionic_phc.c | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-)drivers/net/ethernet/pensando/ionic/Makefile +1
-2@@ -5,5 +5,4 @@ obj-$(CONFIG_IONIC) := ionic.o ionic-y := ionic_main.o ionic_bus_pci.o ionic_devlink.o ionic_dev.o \ ionic_debugfs.o ionic_lif.o ionic_rx_filter.o ionic_ethtool.o \ - ionic_txrx.o ionic_stats.o ionic_fw.o -ionic-$(CONFIG_PTP_1588_CLOCK) += ionic_phc.o + ionic_txrx.o ionic_stats.o ionic_fw.o ionic_phc.odrivers/net/ethernet/pensando/ionic/ionic_phc.c +0
-0@@ -1,6 +1,8 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2017 - 2021 Pensando Systems, Inc */
Quoted 6 lines
drivers/net/ethernet/pensando/ionic/ionic_phc.c line 4
Quoted 1 line
drivers/net/ethernet/pensando/ionic/ionic_phc.c +1
-0+#if IS_ENABLED (CONFIG_PTP_1588_CLOCK )I'm not sure, but think that
IS_ENABLED()is intended to be used inside functions/macros as boolean expression.For other places like this, "#if
CONFIG_PTP_1588_CLOCK" is better fit.
s/#if/#ifdef/
but the patch looks OK to me as is.
Signature · 1 line
~Randy
Quoted 38 lines · Randy Dunlap
Quoted 37 lines · Leon Romanovsky
Quoted 4 lines · Shannon Nelson
Driver link failed with undefined references in some kernel config variations.
v2 - added Fixes tag
Changelogs should be below "---" line.
We don't need them in commit message history.Quoted 28 lines
Fixes 61db421da31b ("ionic: link in the new hw timestamp code")Reported-by kernel test robot <[email protected]>Signed-off-by Shannon Nelson <[email protected]>--- drivers/net/ethernet/pensando/ionic/Makefile | 3 +-- drivers/net/ethernet/pensando/ionic/ionic_phc.c | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-)drivers/net/ethernet/pensando/ionic/Makefile +1
-2@@ -5,5 +5,4 @@ obj-$(CONFIG_IONIC) := ionic.o ionic-y := ionic_main.o ionic_bus_pci.o ionic_devlink.o ionic_dev.o \ ionic_debugfs.o ionic_lif.o ionic_rx_filter.o ionic_ethtool.o \ - ionic_txrx.o ionic_stats.o ionic_fw.o -ionic-$(CONFIG_PTP_1588_CLOCK) += ionic_phc.o + ionic_txrx.o ionic_stats.o ionic_fw.o ionic_phc.odrivers/net/ethernet/pensando/ionic/ionic_phc.c +0
-0@@ -1,6 +1,8 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2017 - 2021 Pensando Systems, Inc */
Quoted 8 lines
Quoted 6 lines
drivers/net/ethernet/pensando/ionic/ionic_phc.c line 4
Quoted 1 line
drivers/net/ethernet/pensando/ionic/ionic_phc.c +1
-0+#if IS_ENABLED (CONFIG_PTP_1588_CLOCK )I'm not sure, but think that
IS_ENABLED()is intended to be used inside functions/macros as boolean expression.For other places like this, "#if
CONFIG_PTP_1588_CLOCK" is better fit.s/#if/#ifdef/
Sure, thanks.