libie: depend on DEBUG_FS when building LIBIE_FWLOG
PATCH v2 1/1 libie: depend on DEBUG_FS when building LIBIE_FWLOG
LIBIE_FWLOG is unusable without DEBUG_FS. Mark it in Kconfig.
Fix build error on ixgbe when DEBUG_FS is not set. To not add another layer of #if IS_ENABLED(LIBIE_FWLOG) in ixgbe fwlog code define debugfs dentry even when DEBUG_FS isn't enabled. In this case the dummy functions of LIBIE_FWLOG will be used, so not initialized dentry isn't a problem.
---
v1 --> v2 [1]:
* add DEBUG_FS dependency in LIBIE_FWLOG
[1] https://lore.kernel.org/netdev/[email protected]/
--- drivers/net/ethernet/intel/Kconfig | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 -- include/linux/net/intel/libie/fwlog.h | 12 ++++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/Kconfig +2 -2
@@ -146,7 +146,7 @@ config IXGBE tristate "Intel(R) 10GbE PCI Express adapters support" depends on PCI depends on PTP_1588_CLOCK_OPTIONAL - select LIBIE_FWLOG + select LIBIE_FWLOG if DEBUG_FS select MDIO select NET_DEVLINK select PLDMFW
@@ -298,7 +298,7 @@ config ICE select DIMLIB select LIBIE select LIBIE_ADMINQ - select LIBIE_FWLOG + select LIBIE_FWLOG if DEBUG_FS select NET_DEVLINK select PACKING select PLDMFW
drivers/net/ethernet/intel/ixgbe/ixgbe.h +0 -2
@@ -821,9 +821,7 @@ struct ixgbe_adapter {#ifdef CONFIG_IXGBE_HWMON struct hwmon_buff *ixgbe_hwmon_buff;#endif /* CONFIG_IXGBE_HWMON */ -#ifdef CONFIG_DEBUG_FS struct dentry *ixgbe_dbg_adapter; -#endif /*CONFIG_DEBUG_FS*/ u8 default_up;/* Bitmask indicating in use pools */
include/linux/net/intel/libie/fwlog.h +12 -0
@@ -78,8 +78,20 @@ struct libie_fwlog { ); }; +#if IS_ENABLED (CONFIG_LIBIE_FWLOG )int libie_fwlog_init (struct libie_fwlog *fwlog,struct libie_fwlog_api *api);void libie_fwlog_deinit (struct libie_fwlog *fwlog);void libie_fwlog_reregister (struct libie_fwlog *fwlog);void libie_get_fwlog_data (struct libie_fwlog *fwlog,u8 *buf,u16 len); +#else +static inline int libie_fwlog_init (struct libie_fwlog *fwlog, +struct libie_fwlog_api *api) +{ +return -EOPNOTSUPP ; +} +static inline void libie_fwlog_deinit (struct libie_fwlog *fwlog) { } +static inline void libie_fwlog_reregister (struct libie_fwlog *fwlog) { } +static inline void libie_get_fwlog_data (struct libie_fwlog *fwlog,u8 *buf, +u16 len) { } +#endif /* CONFIG_LIBIE_FWLOG */ #endif /* _LIBIE_FWLOG_H_ */
Signature · 1 line
2.49.0
Quoted 12 lines · Michal Swiatkowski
LIBIE_FWLOGis unusable withoutDEBUG_FS. Mark it inKconfig.Fix build error on ixgbe when
DEBUG_FSis not set. To not add another layer of #ifIS_ENABLED(LIBIE_FWLOG)in ixgbe fwlog code define debugfs dentry even whenDEBUG_FSisn't enabled. In this case the dummy functions ofLIBIE_FWLOGwill be used, so not initialized dentry isn't a problem.Fixes 641585bc978e ("ixgbe: fwlog support for e610")Reported-by Guenter Roeck <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>
Quoted 5 lines
---
v1 --> v2 [1]:
* addDEBUG_FSdependency inLIBIE_FWLOG
I lightly compile-tested this and overall it looks good to me.
Quoted 106 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Michal Swiatkowski
Sent: Thursday, October 16, 2025 9:30 AM
To: [email protected]
Cc: [email protected]; Keller, Jacob E <[email protected]>; Michal Swiatkowski <[email protected]>; Guenter Roeck <linux@roeck- us.net>
Subject: [Intel-wired-lan] [PATCH iwl-net v2] libie: depend onDEBUG_FSwhen buildingLIBIE_FWLOG
LIBIE_FWLOGis unusable withoutDEBUG_FS. Mark it inKconfig.Fix build error on ixgbe when
DEBUG_FSis not set. To not add another layer of #ifIS_ENABLED(LIBIE_FWLOG)in ixgbe fwlog code define debugfs dentry even whenDEBUG_FSisn't enabled. In this case the dummy functions ofLIBIE_FWLOGwill be used, so not initialized dentry isn't a problem.Fixes 641585bc978e ("ixgbe: fwlog support for e610")Reported-by Guenter Roeck <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>---
v1 --> v2 [1]:
* addDEBUG_FSdependency inLIBIE_FWLOG[1] https://lore.kernel.org/netdev/20251014141110.751104-1-
[email protected]/--- drivers/net/ethernet/intel/Kconfig | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 -- include/linux/net/intel/libie/fwlog.h | 12 ++++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-)drivers/net/ethernet/intel/Kconfig +2
-2@@ -146,7 +146,7 @@ config IXGBE tristate "Intel(R) 10GbE PCI Express adapters support" depends on PCI depends on PTP_1588_CLOCK_OPTIONAL - select LIBIE_FWLOG + select LIBIE_FWLOG if DEBUG_FS select MDIO select NET_DEVLINK select PLDMFW@@ -298,7 +298,7 @@ config ICE select DIMLIB select LIBIE select LIBIE_ADMINQ - select LIBIE_FWLOG + select LIBIE_FWLOG if DEBUG_FS select NET_DEVLINK select PACKING select PLDMFWdrivers/net/ethernet/intel/ixgbe/ixgbe.h +0
-2@@ -821,9 +821,7 @@ struct ixgbe_adapter { #ifdef CONFIG_IXGBE_HWMONstruct hwmon_buff *ixgbe_hwmon_buff;#endif /* CONFIG_IXGBE_HWMON */ -#ifdef CONFIG_DEBUG_FS struct dentry *ixgbe_dbg_adapter; -#endif /*CONFIG_DEBUG_FS*/ u8 default_up;/* Bitmask indicating in use pools */ include/linux/net/intel/libie/fwlog.h +1
-0@@ -78,8 +78,20 @@ struct libie_fwlog { ); }; +#if IS_ENABLED (CONFIG_LIBIE_FWLOG ) int libie_fwlog_init(struct libie_fwlog *fwlog, struct
libie_fwlog_api*api); voidlibie_fwlog_deinit(struct libie_fwlog *fwlog); voidlibie_fwlog_reregister(struct libie_fwlog *fwlog); voidlibie_get_fwlog_data(struct libie_fwlog *fwlog, u8 *buf, u16 len);include/linux/net/intel/libie/fwlog.h +8
-0+#else +static inline int libie_fwlog_init (struct libie_fwlog *fwlog, +struct libie_fwlog_api *api) +{ +return -EOPNOTSUPP ; +} +static inline void libie_fwlog_deinit (struct libie_fwlog *fwlog) { } +static inline void libie_fwlog_reregister (struct libie_fwlog *fwlog){
+} static inline void libie_get_fwlog_data(structlibie_fwlog*fwlog, u8 *buf,include/linux/net/intel/libie/fwlog.h +2
-1+ u16 len) { } +#endif /* CONFIG_LIBIE_FWLOG */ #endif /* _LIBIE_FWLOG_H_ */ --
Quoted 1 line
2.49.0
Quoted 19 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Michal Swiatkowski
Sent: 16 October 2025 13:00
To: [email protected]
Cc: [email protected]; Keller, Jacob E <[email protected]>; Michal Swiatkowski <[email protected]>; Guenter Roeck <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net v2] libie: depend onDEBUG_FSwhen buildingLIBIE_FWLOG
LIBIE_FWLOGis unusable withoutDEBUG_FS. Mark it inKconfig.Fix build error on ixgbe when
DEBUG_FSis not set. To not add another layer of #ifIS_ENABLED(LIBIE_FWLOG)in ixgbe fwlog code define debugfs dentry even whenDEBUG_FSisn't enabled. In this case the dummy functions ofLIBIE_FWLOGwill be used, so not initialized dentry isn't a problem.Fixes 641585bc978e ("ixgbe: fwlog support for e610")Reported-by Guenter Roeck <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>---
v1 --> v2 [1]:
* addDEBUG_FSdependency inLIBIE_FWLOG
Quoted 7 lines
[1] https://lore.kernel.org/netdev/[email protected]/
---drivers/net/ethernet/intel/Kconfig | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 -- include/linux/net/intel/libie/fwlog.h | 12 ++++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-)