RE: [Intel-wired-lan] [PATCH] i40e: Fix i40e_debug() to use struct i40e_hw argument
From: Loktionov, Aleksandr
Date: Wed Apr 29 2026 - 05:25:00 EST
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf
> Of Mohamed Khalfella
> Sent: Tuesday, April 28, 2026 8:15 PM
> To: Nguyen, Anthony L <anthony.l.nguyen@xxxxxxxxx>; Kitszel,
> Przemyslaw <przemyslaw.kitszel@xxxxxxxxx>; David S . Miller
> <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub
> Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>
> Cc: Mohamed Khalfella <mkhalfella@xxxxxxxxxxxxxxx>; intel-wired-
> lan@xxxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> Subject: [Intel-wired-lan] [PATCH] 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.
>
> Signed-off-by: Mohamed Khalfella <mkhalfella@xxxxxxxxxxxxxxx>
> ---
> drivers/net/ethernet/intel/i40e/i40e_debug.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_debug.h
> b/drivers/net/ethernet/intel/i40e/i40e_debug.h
> index e9871dfb32bd..01fd70db9086 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_debug.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e_debug.h
> @@ -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_ */
> --
> 2.53.0
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@xxxxxxxxx>