From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org,
Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH iwl-net v1] ixgbe: guard fwlog code by CONFIG_DEBUG_FS
Date: Tue, 14 Oct 2025 16:11:10 +0200 [thread overview]
Message-ID: <20251014141110.751104-1-michal.swiatkowski@linux.intel.com> (raw)
Building the ixgbe without CONFIG_DEBUG_FS leads to a build error. Fix
that by guarding fwlog code.
Fixes: 641585bc978e ("ixgbe: fwlog support for e610")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Closes: https://lore.kernel.org/lkml/f594c621-f9e1-49f2-af31-23fbcb176058@roeck-us.net/
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 2 ++
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
index c2f8189a0738..c5d76222df18 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
@@ -3921,6 +3921,7 @@ static int ixgbe_read_pba_string_e610(struct ixgbe_hw *hw, u8 *pba_num,
return err;
}
+#ifdef CONFIG_DEBUG_FS
static int __fwlog_send_cmd(void *priv, struct libie_aq_desc *desc, void *buf,
u16 size)
{
@@ -3952,6 +3953,7 @@ void ixgbe_fwlog_deinit(struct ixgbe_hw *hw)
libie_fwlog_deinit(&hw->fwlog);
}
+#endif /* CONFIG_DEBUG_FS */
static const struct ixgbe_mac_operations mac_ops_e610 = {
.init_hw = ixgbe_init_hw_generic,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h
index 11916b979d28..5317798b3263 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h
@@ -96,7 +96,15 @@ int ixgbe_aci_update_nvm(struct ixgbe_hw *hw, u16 module_typeid,
bool last_command, u8 command_flags);
int ixgbe_nvm_write_activate(struct ixgbe_hw *hw, u16 cmd_flags,
u8 *response_flags);
+#ifdef CONFIG_DEBUG_FS
int ixgbe_fwlog_init(struct ixgbe_hw *hw);
void ixgbe_fwlog_deinit(struct ixgbe_hw *hw);
+#else
+static inline int ixgbe_fwlog_init(struct ixgbe_hw *hw)
+{
+ return -EOPNOTSUPP;
+}
+static inline void ixgbe_fwlog_deinit(struct ixgbe_hw *hw) {}
+#endif /* CONFIG_DEBUG_FS */
#endif /* _IXGBE_E610_H_ */
--
2.49.0
next reply other threads:[~2025-10-14 14:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 14:11 Michal Swiatkowski [this message]
2025-10-14 23:41 ` [Intel-wired-lan] [PATCH iwl-net v1] ixgbe: guard fwlog code by CONFIG_DEBUG_FS Jacob Keller
2025-10-15 5:24 ` Michal Swiatkowski
2025-10-15 17:32 ` Jacob Keller
2025-10-15 17:53 ` Guenter Roeck
2025-10-15 19:07 ` Michal Swiatkowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251014141110.751104-1-michal.swiatkowski@linux.intel.com \
--to=michal.swiatkowski@linux.intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=linux@roeck-us.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).