mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH iwl-net] libie: fix string names for AQ error codes
@ 2025-09-16 20:09 Jacob Keller
  2025-09-17  6:49 ` [Intel-wired-lan] " Paul Menzel
  2025-09-17 10:01 ` Loktionov, Aleksandr
  0 siblings, 2 replies; 3+ messages in thread
From: Jacob Keller @ 2025-09-16 20:09 UTC (permalink / raw)
  To: Tony Nguyen, Przemek Kitszel, Alexander Lobakin, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Michal Swiatkowski
  Cc: intel-wired-lan, netdev, linux-kernel, Jacob Keller

The LIBIE_AQ_STR macro() introduced by commit 5feaa7a07b85 ("libie: add
adminq helper for converting err to str") is used in order to generate
strings for printing human readable error codes. Its definition is missing
the separating underscore ('_') character which makes the resulting strings
difficult to read. Additionally, the string won't match the source code,
preventing search tools from working properly.

Add the missing underscore character, fixing the error string names.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Fixes: 5feaa7a07b85 ("libie: add adminq helper for converting err to str")
---
I found this recently while reviewing the libie code. I believe this
warrants a net fix because it is both simple, and because users may attempt
to pass printed error codes into search tools like grep, and will be unable
to locate the error values without manually adding the missing '_'.
---
 drivers/net/ethernet/intel/libie/adminq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/libie/adminq.c b/drivers/net/ethernet/intel/libie/adminq.c
index 55356548e3f0..7b4ff479e7e5 100644
--- a/drivers/net/ethernet/intel/libie/adminq.c
+++ b/drivers/net/ethernet/intel/libie/adminq.c
@@ -6,7 +6,7 @@
 
 static const char * const libie_aq_str_arr[] = {
 #define LIBIE_AQ_STR(x)					\
-	[LIBIE_AQ_RC_##x]	= "LIBIE_AQ_RC" #x
+	[LIBIE_AQ_RC_##x]	= "LIBIE_AQ_RC_" #x
 	LIBIE_AQ_STR(OK),
 	LIBIE_AQ_STR(EPERM),
 	LIBIE_AQ_STR(ENOENT),

---
base-commit: 93ab4881a4e2b9657bdce4b8940073bfb4ed5eab
change-id: 20250916-jk-fix-missing-underscore-e2ffc7e39438

Best regards,
--  
Jacob Keller <jacob.e.keller@intel.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-net] libie: fix string names for AQ error codes
  2025-09-16 20:09 [PATCH iwl-net] libie: fix string names for AQ error codes Jacob Keller
@ 2025-09-17  6:49 ` Paul Menzel
  2025-09-17 10:01 ` Loktionov, Aleksandr
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2025-09-17  6:49 UTC (permalink / raw)
  To: Jacob Keller
  Cc: Tony Nguyen, Przemek Kitszel, Alexander Lobakin, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Michal Swiatkowski, intel-wired-lan, netdev, linux-kernel

Dear Jacob,


Thank you for your patch.

Am 16.09.25 um 22:09 schrieb Jacob Keller:
> The LIBIE_AQ_STR macro() introduced by commit 5feaa7a07b85 ("libie: add
> adminq helper for converting err to str") is used in order to generate
> strings for printing human readable error codes. Its definition is missing
> the separating underscore ('_') character which makes the resulting strings
> difficult to read. Additionally, the string won't match the source code,
> preventing search tools from working properly.
> 
> Add the missing underscore character, fixing the error string names.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Fixes: 5feaa7a07b85 ("libie: add adminq helper for converting err to str")
> ---
> I found this recently while reviewing the libie code. I believe this
> warrants a net fix because it is both simple, and because users may attempt
> to pass printed error codes into search tools like grep, and will be unable
> to locate the error values without manually adding the missing '_'.

As always, great commit message! Thank you.

> ---
>   drivers/net/ethernet/intel/libie/adminq.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/libie/adminq.c b/drivers/net/ethernet/intel/libie/adminq.c
> index 55356548e3f0..7b4ff479e7e5 100644
> --- a/drivers/net/ethernet/intel/libie/adminq.c
> +++ b/drivers/net/ethernet/intel/libie/adminq.c
> @@ -6,7 +6,7 @@
>   
>   static const char * const libie_aq_str_arr[] = {
>   #define LIBIE_AQ_STR(x)					\
> -	[LIBIE_AQ_RC_##x]	= "LIBIE_AQ_RC" #x
> +	[LIBIE_AQ_RC_##x]	= "LIBIE_AQ_RC_" #x
>   	LIBIE_AQ_STR(OK),
>   	LIBIE_AQ_STR(EPERM),
>   	LIBIE_AQ_STR(ENOENT),

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


Kind regards,

Paul

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [Intel-wired-lan] [PATCH iwl-net] libie: fix string names for AQ error codes
  2025-09-16 20:09 [PATCH iwl-net] libie: fix string names for AQ error codes Jacob Keller
  2025-09-17  6:49 ` [Intel-wired-lan] " Paul Menzel
@ 2025-09-17 10:01 ` Loktionov, Aleksandr
  1 sibling, 0 replies; 3+ messages in thread
From: Loktionov, Aleksandr @ 2025-09-17 10:01 UTC (permalink / raw)
  To: Keller, Jacob E, Nguyen, Anthony L, Kitszel, Przemyslaw, Lobakin,
	Aleksander, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Michal Swiatkowski
  Cc: intel-wired-lan, netdev, linux-kernel, Keller, Jacob E



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Jacob Keller
> Sent: Tuesday, September 16, 2025 10:09 PM
> To: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel,
> Przemyslaw <przemyslaw.kitszel@intel.com>; Lobakin, Aleksander
> <aleksander.lobakin@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>;
> David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>; Michal Swiatkowski
> <michal.swiatkowski@linux.intel.com>
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; Keller, Jacob E <jacob.e.keller@intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net] libie: fix string names for
> AQ error codes
> 
> The LIBIE_AQ_STR macro() introduced by commit 5feaa7a07b85 ("libie:
> add adminq helper for converting err to str") is used in order to
> generate strings for printing human readable error codes. Its
> definition is missing the separating underscore ('_') character which
> makes the resulting strings difficult to read. Additionally, the
> string won't match the source code, preventing search tools from
> working properly.
> 
> Add the missing underscore character, fixing the error string names.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Fixes: 5feaa7a07b85 ("libie: add adminq helper for converting err to
> str")
> ---
> I found this recently while reviewing the libie code. I believe this
> warrants a net fix because it is both simple, and because users may
> attempt to pass printed error codes into search tools like grep, and
> will be unable to locate the error values without manually adding the
> missing '_'.
> ---
>  drivers/net/ethernet/intel/libie/adminq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/libie/adminq.c
> b/drivers/net/ethernet/intel/libie/adminq.c
> index 55356548e3f0..7b4ff479e7e5 100644
> --- a/drivers/net/ethernet/intel/libie/adminq.c
> +++ b/drivers/net/ethernet/intel/libie/adminq.c
> @@ -6,7 +6,7 @@
> 
>  static const char * const libie_aq_str_arr[] = {
>  #define LIBIE_AQ_STR(x)					\
> -	[LIBIE_AQ_RC_##x]	= "LIBIE_AQ_RC" #x
> +	[LIBIE_AQ_RC_##x]	= "LIBIE_AQ_RC_" #x
>  	LIBIE_AQ_STR(OK),
>  	LIBIE_AQ_STR(EPERM),
>  	LIBIE_AQ_STR(ENOENT),
> 
> ---
> base-commit: 93ab4881a4e2b9657bdce4b8940073bfb4ed5eab
> change-id: 20250916-jk-fix-missing-underscore-e2ffc7e39438
> 
> Best regards,
> --
> Jacob Keller <jacob.e.keller@intel.com>

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-17 10:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-16 20:09 [PATCH iwl-net] libie: fix string names for AQ error codes Jacob Keller
2025-09-17  6:49 ` [Intel-wired-lan] " Paul Menzel
2025-09-17 10:01 ` Loktionov, Aleksandr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®