Message ID | 20210505000059.59760-1-snelson@pensando.io (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [v2,net] ionic: fix ptp support config breakage | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | fail | 1 blamed authors not CCed: allenbh@pensando.io; 2 maintainers not CCed: dan.carpenter@oracle.com allenbh@pensando.io |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 18 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
On Tue, May 04, 2021 at 05:00:59PM -0700, Shannon Nelson wrote: > 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. > > Fixes: 61db421da31b ("ionic: link in the new hw timestamp code") > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Shannon Nelson <snelson@pensando.io> > --- > drivers/net/ethernet/pensando/ionic/Makefile | 3 +-- > drivers/net/ethernet/pensando/ionic/ionic_phc.c | 3 +++ > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/pensando/ionic/Makefile b/drivers/net/ethernet/pensando/ionic/Makefile > index 4e7642a2d25f..61c40169cb1f 100644 > --- a/drivers/net/ethernet/pensando/ionic/Makefile > +++ b/drivers/net/ethernet/pensando/ionic/Makefile > @@ -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 > diff --git a/drivers/net/ethernet/pensando/ionic/ionic_phc.c b/drivers/net/ethernet/pensando/ionic/ionic_phc.c > index a87c87e86aef..30c78808c45a 100644 > --- a/drivers/net/ethernet/pensando/ionic/ionic_phc.c > +++ b/drivers/net/ethernet/pensando/ionic/ionic_phc.c > @@ -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
On 5/4/21 10:32 PM, Leon Romanovsky wrote: > On Tue, May 04, 2021 at 05:00:59PM -0700, Shannon Nelson wrote: >> 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. > >> >> Fixes: 61db421da31b ("ionic: link in the new hw timestamp code") >> Reported-by: kernel test robot <lkp@intel.com> >> Signed-off-by: Shannon Nelson <snelson@pensando.io> >> --- >> drivers/net/ethernet/pensando/ionic/Makefile | 3 +-- >> drivers/net/ethernet/pensando/ionic/ionic_phc.c | 3 +++ >> 2 files changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/net/ethernet/pensando/ionic/Makefile b/drivers/net/ethernet/pensando/ionic/Makefile >> index 4e7642a2d25f..61c40169cb1f 100644 >> --- a/drivers/net/ethernet/pensando/ionic/Makefile >> +++ b/drivers/net/ethernet/pensando/ionic/Makefile >> @@ -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 >> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_phc.c b/drivers/net/ethernet/pensando/ionic/ionic_phc.c >> index a87c87e86aef..30c78808c45a 100644 >> --- a/drivers/net/ethernet/pensando/ionic/ionic_phc.c >> +++ b/drivers/net/ethernet/pensando/ionic/ionic_phc.c >> @@ -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. s/#if/#ifdef/ but the patch looks OK to me as is.
On Tue, May 04, 2021 at 11:13:59PM -0700, Randy Dunlap wrote: > On 5/4/21 10:32 PM, Leon Romanovsky wrote: > > On Tue, May 04, 2021 at 05:00:59PM -0700, Shannon Nelson wrote: > >> 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. > > > >> > >> Fixes: 61db421da31b ("ionic: link in the new hw timestamp code") > >> Reported-by: kernel test robot <lkp@intel.com> > >> Signed-off-by: Shannon Nelson <snelson@pensando.io> > >> --- > >> drivers/net/ethernet/pensando/ionic/Makefile | 3 +-- > >> drivers/net/ethernet/pensando/ionic/ionic_phc.c | 3 +++ > >> 2 files changed, 4 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/net/ethernet/pensando/ionic/Makefile b/drivers/net/ethernet/pensando/ionic/Makefile > >> index 4e7642a2d25f..61c40169cb1f 100644 > >> --- a/drivers/net/ethernet/pensando/ionic/Makefile > >> +++ b/drivers/net/ethernet/pensando/ionic/Makefile > >> @@ -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 > >> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_phc.c b/drivers/net/ethernet/pensando/ionic/ionic_phc.c > >> index a87c87e86aef..30c78808c45a 100644 > >> --- a/drivers/net/ethernet/pensando/ionic/ionic_phc.c > >> +++ b/drivers/net/ethernet/pensando/ionic/ionic_phc.c > >> @@ -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. > > s/#if/#ifdef/ Sure, thanks.
diff --git a/drivers/net/ethernet/pensando/ionic/Makefile b/drivers/net/ethernet/pensando/ionic/Makefile index 4e7642a2d25f..61c40169cb1f 100644 --- a/drivers/net/ethernet/pensando/ionic/Makefile +++ b/drivers/net/ethernet/pensando/ionic/Makefile @@ -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 diff --git a/drivers/net/ethernet/pensando/ionic/ionic_phc.c b/drivers/net/ethernet/pensando/ionic/ionic_phc.c index a87c87e86aef..30c78808c45a 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_phc.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_phc.c @@ -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) */
Driver link failed with undefined references in some kernel config variations. v2 - added Fixes tag Fixes: 61db421da31b ("ionic: link in the new hw timestamp code") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Shannon Nelson <snelson@pensando.io> --- drivers/net/ethernet/pensando/ionic/Makefile | 3 +-- drivers/net/ethernet/pensando/ionic/ionic_phc.c | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-)