[v2] net/i40e/base: fix the debug print format

Message ID 20250115074417.396909-1-jaroslaw.ilgiewicz@intel.com (mailing list archive)
State Rejected
Delegated to: Bruce Richardson
Headers
Series [v2] net/i40e/base: fix the debug print format |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS

Commit Message

Jaroslaw Ilgiewicz Jan. 15, 2025, 7:44 a.m. UTC
This patch modifies format specifier in debug prints to match to the
change of time variables from 64 bit to 32 bit.

Fixes: d980a401b137 ("net/i40e/base: add NVM acquire with custom timeout")
Cc: stable@dpdk.org

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Signed-off-by: Jaroslaw Ilgiewicz <jaroslaw.ilgiewicz@intel.com>
---
 drivers/net/i40e/base/README     |  2 +-
 drivers/net/i40e/base/i40e_nvm.c | 10 ++++------
 2 files changed, 5 insertions(+), 7 deletions(-)
  

Comments

Bruce Richardson Jan. 21, 2025, 9:05 a.m. UTC | #1
On Wed, Jan 15, 2025 at 03:44:17PM +0800, Jaroslaw Ilgiewicz wrote:
> This patch modifies format specifier in debug prints to match to the
> change of time variables from 64 bit to 32 bit.
> 
> Fixes: d980a401b137 ("net/i40e/base: add NVM acquire with custom timeout")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
> Signed-off-by: Jaroslaw Ilgiewicz <jaroslaw.ilgiewicz@intel.com>
> ---
>  drivers/net/i40e/base/README     |  2 +-
>  drivers/net/i40e/base/i40e_nvm.c | 10 ++++------
>  2 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/i40e/base/README b/drivers/net/i40e/base/README
> index c5305ffae0..188633dde3 100644
> --- a/drivers/net/i40e/base/README
> +++ b/drivers/net/i40e/base/README
> @@ -6,7 +6,7 @@ Intel® I40E driver
>  ==================
>  
>  This directory contains source code of i40e base driver generated on
> -2024-08-30 released by the team which develops
> +2025-01-15 released by the team which develops
>  basic drivers for any i40e NIC. The directory of base/ contains the
>  original source package.
>  This driver is valid for the product(s) listed below
> diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
> index 3e16a0d997..890c1dfc8a 100644
> --- a/drivers/net/i40e/base/i40e_nvm.c
> +++ b/drivers/net/i40e/base/i40e_nvm.c
> @@ -145,9 +145,8 @@ enum i40e_status_code i40e_acquire_nvm_ex(struct i40e_hw *hw,
>  
>  	if (ret_code)
>  		i40e_debug(hw, I40E_DEBUG_NVM,
> -			   "NVM acquire type %d failed time_left=%llu ret=%d aq_err=%d\n",
> -			   access, (unsigned long long)time_left, ret_code,
> -			   hw->aq.asq_last_status);
> +			   "NVM acquire type %d failed time_left=%" PRIu32 " ret=%d aq_err=%d\n",
> +			   access, time_left, ret_code, hw->aq.asq_last_status);
>  

Since this is not actually fixing a bug, but just aligning the DPDK code
with the internal base code, I think we can defer this patch. Let's look at
it again, if it's worth aligning these simple fmt strings, when we next have
a base code update with some more significant changes in it.

Thanks,
/Bruce
  

Patch

diff --git a/drivers/net/i40e/base/README b/drivers/net/i40e/base/README
index c5305ffae0..188633dde3 100644
--- a/drivers/net/i40e/base/README
+++ b/drivers/net/i40e/base/README
@@ -6,7 +6,7 @@  Intel® I40E driver
 ==================
 
 This directory contains source code of i40e base driver generated on
-2024-08-30 released by the team which develops
+2025-01-15 released by the team which develops
 basic drivers for any i40e NIC. The directory of base/ contains the
 original source package.
 This driver is valid for the product(s) listed below
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 3e16a0d997..890c1dfc8a 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -145,9 +145,8 @@  enum i40e_status_code i40e_acquire_nvm_ex(struct i40e_hw *hw,
 
 	if (ret_code)
 		i40e_debug(hw, I40E_DEBUG_NVM,
-			   "NVM acquire type %d failed time_left=%llu ret=%d aq_err=%d\n",
-			   access, (unsigned long long)time_left, ret_code,
-			   hw->aq.asq_last_status);
+			   "NVM acquire type %d failed time_left=%" PRIu32 " ret=%d aq_err=%d\n",
+			   access, time_left, ret_code, hw->aq.asq_last_status);
 
 	if (ret_code && time_left) {
 		/* Poll until the current NVM owner timeouts */
@@ -168,9 +167,8 @@  enum i40e_status_code i40e_acquire_nvm_ex(struct i40e_hw *hw,
 		if (ret_code != I40E_SUCCESS) {
 			hw->nvm.hw_semaphore_timeout = 0;
 			i40e_debug(hw, I40E_DEBUG_NVM,
-				   "NVM acquire timed out, wait %llu ms before trying again. status=%d aq_err=%d\n",
-				   (unsigned long long)time_left, ret_code,
-				   hw->aq.asq_last_status);
+				   "NVM acquire timed out, wait %" PRIu32 " ms before trying again. status=%d aq_err=%d\n",
+				   time_left, ret_code, hw->aq.asq_last_status);
 		}
 	}