i40e: Fix i40e_debug() to use struct i40e_hw argument
Subsystems (3)
PATCH 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 happen to be the name of the variable in the context where the marco is expanded. Fix the macro to use the passed argument.
--- 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
@@ -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
Quoted 41 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Mohamed Khalfella
Sent: Tuesday, April 28, 2026 8:15 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]>; intel-wired- [email protected]; [email protected]; linux- [email protected]
Subject: [Intel-wired-lan] [PATCH] i40e: Fixi40e_debug()to use structi40e_hwargument
i40e_debug()macro takes structi40e_hw*h as first argument. But the macro body uses hw instead of h. This has been working so far because hw happen to be the name of the variable in the context where the marco is expanded. Fix the macro to use the passed argument.Signed-off-by Mohamed Khalfella <[email protected]>--- 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
-2@@ -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_ */ --
Quoted 1 line
2.53.0
Dear Mohamed,
Thank you for your patch.
Am 28.04.26 um 20:14 schrieb Mohamed Khalfella:
Quoted 3 lines
i40e_debug()macro takes structi40e_hw*h as first argument. But the macro body uses hw instead of h. This has been working so far because hw happen to be the name of the variable in the context where the marco is
marco → ma*cr*o
Quoted 1 line
expanded. Fix the macro to use the passed argument.
I’d add a Fixes: tag, but the maintainers might have more input.
Quoted 10 lines
Signed-off-by Mohamed Khalfella <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/intel/i40e/i40e_debug.h +0
-0
drivers/net/ethernet/intel/i40e/i40e_debug.h struct device *i40e_hw_to_dev(struct i40e_hw *hw); · line 48
Quoted 8 lines
drivers/net/ethernet/intel/i40e/i40e_debug.h +1
-1@@ -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_ */
Kind regards,
Paul
PS: gemini/gemini-3.1-pro-preview embargoed it’s review until the evening [1].
[1]: https://sashiko.dev/#/patchset/20260428181450.2622899-1-mkhalfella%40purestorage.com
Quoted 11 lines · Paul Menzel
Dear Mohamed,
Thank you for your patch.
Am 28.04.26 um 20:14 schrieb Mohamed Khalfella:
Quoted 3 lines
i40e_debug()macro takes structi40e_hw*h as first argument. But the macro body uses hw instead of h. This has been working so far because hw happen to be the name of the variable in the context where the marco ismarco → ma*cr*o
Good catch. Also 'happen' should be 'happens'
Quoted 4 lines
Quoted 2 lines
expanded. Fix the macro to use the passed argument.
I’d add a Fixes: tag, but the maintainers might have more input.
Yes, I should have added Fixes: tag. I will leave it to the maintainer to decide if v2 is needed to fix the spelling mistakes and add Fixes tag.
Quoted 34 lines
Quoted 11 lines
Signed-off-by Mohamed Khalfella <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/intel/i40e/i40e_debug.h +0
-0drivers/net/ethernet/intel/i40e/i40e_debug.h struct device *i40e_hw_to_dev(struct i40e_hw *hw); · line 48
Quoted 8 lines
drivers/net/ethernet/intel/i40e/i40e_debug.h +1
-1@@ -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_ */ Reviewed-by Paul Menzel <[email protected]>Kind regards,
Paul
PS: gemini/gemini-3.1-pro-preview embargoed it’s review until the evening [1].
[1]:
https://sashiko.dev/#/patchset/20260428181450.2622899-1-mkhalfella%40purestorage.com
Quoted 18 lines · Mohamed Khalfella
Quoted 11 lines · Paul Menzel
Dear Mohamed,
Thank you for your patch.
Am 28.04.26 um 20:14 schrieb Mohamed Khalfella:
Quoted 3 lines
i40e_debug()macro takes structi40e_hw*h as first argument. But the macro body uses hw instead of h. This has been working so far because hw happen to be the name of the variable in the context where the marco ismarco → ma*cr*o
Good catch. Also 'happen' should be 'happens'
Quoted 3 lines
Quoted 2 lines
expanded. Fix the macro to use the passed argument.
Quoted 8 lines
Quoted 1 line
I’d add a Fixes: tag, but the maintainers might have more input.
Yes, I should have added Fixes: tag. I will leave it to the maintainer to decide if v2 is needed to fix the spelling mistakes and add Fixes tag.
Fixes 5dfd37c37a44 ("i40e: Split i40e_osdep.h")
Please send a v2 with the fixes tag and typo. It will make it easier to avoid losing this data.
Quoted 21 lines · Jacob Keller
Quoted 20 lines · Mohamed Khalfella
Quoted 11 lines · Paul Menzel
Dear Mohamed,
Thank you for your patch.
Am 28.04.26 um 20:14 schrieb Mohamed Khalfella:
Quoted 3 lines
i40e_debug()macro takes structi40e_hw*h as first argument. But the macro body uses hw instead of h. This has been working so far because hw happen to be the name of the variable in the context where the marco ismarco → ma*cr*o
Good catch. Also 'happen' should be 'happens'
Quoted 4 lines
Quoted 2 lines
expanded. Fix the macro to use the passed argument.
I’d add a Fixes: tag, but the maintainers might have more input.
Quoted 8 lines
Quoted 6 lines
Yes, I should have added Fixes: tag. I will leave it to the maintainer to decide if v2 is needed to fix the spelling mistakes and add Fixes tag.
Fixes 5dfd37c37a44 ("i40e: Split i40e_osdep.h")Please send a v2 with the fixes tag and typo. It will make it easier to avoid losing this data.