[PATCH] i40e: Fix i40e_debug() to use struct i40e_hw argument

Mohamed Khalfella posted 1 patch 1 month, 2 weeks ago
There is a newer version of this series
drivers/net/ethernet/intel/i40e/i40e_debug.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] i40e: Fix i40e_debug() to use struct i40e_hw argument
Posted by Mohamed Khalfella 1 month, 2 weeks ago
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@purestorage.com>
---
 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
Re: [Intel-wired-lan] [PATCH] i40e: Fix i40e_debug() to use struct i40e_hw argument
Posted by Paul Menzel 1 month, 2 weeks ago
Dear Mohamed,


Thank you for your patch.

Am 28.04.26 um 20:14 schrieb Mohamed Khalfella:
> 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

marco → ma*cr*o

> expanded. Fix the macro to use the passed argument.

I’d add a Fixes: tag, but the maintainers might have more input.

> Signed-off-by: Mohamed Khalfella <mkhalfella@purestorage.com>
> ---
>   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_ */

Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>


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
Re: [Intel-wired-lan] [PATCH] i40e: Fix i40e_debug() to use struct i40e_hw argument
Posted by Mohamed Khalfella 1 month, 2 weeks ago
On Wed 2026-04-29 13:02:00 +0200, Paul Menzel wrote:
> Dear Mohamed,
> 
> 
> Thank you for your patch.
> 
> Am 28.04.26 um 20:14 schrieb Mohamed Khalfella:
> > 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
> 
> marco → ma*cr*o

Good catch. Also 'happen' should be 'happens'

> 
> > 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.

Fixes: 5dfd37c37a44 ("i40e: Split i40e_osdep.h")

> 
> > Signed-off-by: Mohamed Khalfella <mkhalfella@purestorage.com>
> > ---
> >   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_ */
> 
> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
> 
> 
> 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
Re: [Intel-wired-lan] [PATCH] i40e: Fix i40e_debug() to use struct i40e_hw argument
Posted by Jacob Keller 1 month, 1 week ago
On 4/29/2026 9:52 AM, Mohamed Khalfella wrote:
> On Wed 2026-04-29 13:02:00 +0200, Paul Menzel wrote:
>> Dear Mohamed,
>>
>>
>> Thank you for your patch.
>>
>> Am 28.04.26 um 20:14 schrieb Mohamed Khalfella:
>>> 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
>>
>> marco → ma*cr*o
> 
> Good catch. Also 'happen' should be 'happens'
> 
>>
>>> 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.
> 
> 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.
Re: [Intel-wired-lan] [PATCH] i40e: Fix i40e_debug() to use struct i40e_hw argument
Posted by Mohamed Khalfella 1 month, 1 week ago
On Wed 2026-05-06 14:57:26 -0700, Jacob Keller wrote:
> On 4/29/2026 9:52 AM, Mohamed Khalfella wrote:
> > On Wed 2026-04-29 13:02:00 +0200, Paul Menzel wrote:
> >> Dear Mohamed,
> >>
> >>
> >> Thank you for your patch.
> >>
> >> Am 28.04.26 um 20:14 schrieb Mohamed Khalfella:
> >>> 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
> >>
> >> marco → ma*cr*o
> > 
> > Good catch. Also 'happen' should be 'happens'
> > 
> >>
> >>> 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.
> > 
> > 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.

Done https://lore.kernel.org/all/20260506224123.691160-1-mkhalfella@purestorage.com/
RE: [Intel-wired-lan] [PATCH] i40e: Fix i40e_debug() to use struct i40e_hw argument
Posted by Loktionov, Aleksandr 1 month, 2 weeks ago

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Mohamed Khalfella
> Sent: Tuesday, April 28, 2026 8:15 PM
> To: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel,
> Przemyslaw <przemyslaw.kitszel@intel.com>; David S . Miller
> <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub
> Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>
> Cc: Mohamed Khalfella <mkhalfella@purestorage.com>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org
> 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@purestorage.com>
> ---
>  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@intel.com>