Skip to contentSkip to conversation

i40e: Fix i40e_debug() to use struct i40e_hw argument

PATCH In review Mohamed Khalfella 2 participants 2 messages May 6 – May 26

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 i40e: Fix i40e_debug() to use struct i40e_hw argument

i40e_debug() macro takes struct i40e_hw *h as first argument. But the macro body uses hw instead of h. This has been working so far because hw happens to be the name of the variable in the context where the macro is expanded. Fix the macro to use the passed argument.

Fixes 5dfd37c37a44 ("i40e: Split i40e_osdep.h")
---
 drivers/net/ethernet/intel/i40e/i40e_debug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_debug.h +1 -1
index e9871dfb32bd4..01fd70db90866 100644
@@ -42,7 +42,7 @@ struct device *i40e_hw_to_dev(struct i40e_hw *hw);
 #define i40e_debug(h, m, s, ...)				\
 do {								\
 	if (((m) & (h)->debug_mask))				\
-		dev_info(i40e_hw_to_dev(hw), s, ##__VA_ARGS__);	\
+		dev_info(i40e_hw_to_dev(h), s, ##__VA_ARGS__);	\
 } while (0)
 
 #endif /* _I40E_DEBUG_H_ */
Signature · 1 line
2.53.0
Tested-by on v2 1/1
#1 lore raw
Quoted 16 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Mohamed Khalfella
Sent: Wednesday, May 6, 2026 3:41 PM
To: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; David S . Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>
Cc: Mohamed Khalfella <[email protected]>; Loktionov, Aleksandr <[email protected]>; Paul Menzel <[email protected]>; Keller, Jacob E <[email protected]>; [email protected]; [email protected]; linux- [email protected]
Subject: [Intel-wired-lan] [PATCH v2] i40e: Fix i40e_debug() to use struct i40e_hw argument

i40e_debug() macro takes struct i40e_hw *h as first argument. But the macro body uses hw instead of h. This has been working so far because hw happens to be the name of the variable in the context where the macro is expanded. Fix the macro to use the passed argument.

Quoted 7 lines
Fixes 5dfd37c37a44 ("i40e: Split i40e_osdep.h")
---
 drivers/net/ethernet/intel/i40e/i40e_debug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)