* [PATCH] net/i40e/base: fix invalid log format characters
@ 2024-10-25 12:27 Bruce Richardson
2024-10-25 13:21 ` David Marchand
2024-10-28 12:30 ` David Marchand
0 siblings, 2 replies; 4+ messages in thread
From: Bruce Richardson @ 2024-10-25 12:27 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
With commit cb593a832630 ("net/i40e/base: reduce size of time
variables"), the time_left value is 32-bits rather than 64-bits.
However the printf-style format strings were never updated in the logs,
so were left at PRIu64. Change them to PRIu32, fixing the build when
additional format warnings were enabled.
Fixes: cb593a832630 ("net/i40e/base: reduce size of time variables")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/i40e/base/i40e_nvm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 185af67817..3e16a0d997 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -79,7 +79,7 @@ enum i40e_status_code i40e_acquire_nvm(struct i40e_hw *hw,
if (ret_code)
i40e_debug(hw, I40E_DEBUG_NVM,
- "NVM acquire type %d failed time_left=%" PRIu64 " ret=%d aq_err=%d\n",
+ "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) {
@@ -101,7 +101,7 @@ enum i40e_status_code i40e_acquire_nvm(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 %" PRIu64 " ms before trying again. status=%d aq_err=%d\n",
+ "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);
}
}
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net/i40e/base: fix invalid log format characters
2024-10-25 12:27 [PATCH] net/i40e/base: fix invalid log format characters Bruce Richardson
@ 2024-10-25 13:21 ` David Marchand
2024-10-25 14:51 ` Bruce Richardson
2024-10-28 12:30 ` David Marchand
1 sibling, 1 reply; 4+ messages in thread
From: David Marchand @ 2024-10-25 13:21 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Fri, Oct 25, 2024 at 2:28 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> With commit cb593a832630 ("net/i40e/base: reduce size of time
> variables"), the time_left value is 32-bits rather than 64-bits.
> However the printf-style format strings were never updated in the logs,
> so were left at PRIu64. Change them to PRIu32, fixing the build when
> additional format warnings were enabled.
>
> Fixes: cb593a832630 ("net/i40e/base: reduce size of time variables")
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
I'll wait for the CI then apply it directly in main.
Btw, I tested this patch after removing following options:
$ git diff
diff --git a/drivers/net/i40e/base/meson.build
b/drivers/net/i40e/base/meson.build
index d94108629b..ffe264a934 100644
--- a/drivers/net/i40e/base/meson.build
+++ b/drivers/net/i40e/base/meson.build
@@ -12,8 +12,6 @@ sources = [
]
error_cflags = ['-Wno-sign-compare', '-Wno-unused-value',
- '-Wno-format', '-Wno-format-security',
- '-Wno-format-nonliteral',
'-Wno-strict-aliasing', '-Wno-unused-but-set-variable',
'-Wno-unused-parameter',
]
and it builds fine on my f39.
The -Wformat-security caught my eye especially, because net/i40e is
the only driver silencing this warning while the whole DPDK tree is
built with it.
--
David Marchand
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net/i40e/base: fix invalid log format characters
2024-10-25 13:21 ` David Marchand
@ 2024-10-25 14:51 ` Bruce Richardson
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2024-10-25 14:51 UTC (permalink / raw)
To: David Marchand; +Cc: dev
On Fri, Oct 25, 2024 at 03:21:02PM +0200, David Marchand wrote:
> On Fri, Oct 25, 2024 at 2:28 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > With commit cb593a832630 ("net/i40e/base: reduce size of time
> > variables"), the time_left value is 32-bits rather than 64-bits.
> > However the printf-style format strings were never updated in the logs,
> > so were left at PRIu64. Change them to PRIu32, fixing the build when
> > additional format warnings were enabled.
> >
> > Fixes: cb593a832630 ("net/i40e/base: reduce size of time variables")
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
> I'll wait for the CI then apply it directly in main.
>
>
> Btw, I tested this patch after removing following options:
>
> $ git diff
> diff --git a/drivers/net/i40e/base/meson.build
> b/drivers/net/i40e/base/meson.build
> index d94108629b..ffe264a934 100644
> --- a/drivers/net/i40e/base/meson.build
> +++ b/drivers/net/i40e/base/meson.build
> @@ -12,8 +12,6 @@ sources = [
> ]
>
> error_cflags = ['-Wno-sign-compare', '-Wno-unused-value',
> - '-Wno-format', '-Wno-format-security',
> - '-Wno-format-nonliteral',
> '-Wno-strict-aliasing', '-Wno-unused-but-set-variable',
> '-Wno-unused-parameter',
> ]
>
> and it builds fine on my f39.
>
And also on Ubuntu in my tests. I'll push a patch removing those error
flags when this patch is merged (and next-net-intel rebased).
/Bruce
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net/i40e/base: fix invalid log format characters
2024-10-25 12:27 [PATCH] net/i40e/base: fix invalid log format characters Bruce Richardson
2024-10-25 13:21 ` David Marchand
@ 2024-10-28 12:30 ` David Marchand
1 sibling, 0 replies; 4+ messages in thread
From: David Marchand @ 2024-10-28 12:30 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Fri, Oct 25, 2024 at 2:28 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> With commit cb593a832630 ("net/i40e/base: reduce size of time
> variables"), the time_left value is 32-bits rather than 64-bits.
> However the printf-style format strings were never updated in the logs,
> so were left at PRIu64. Change them to PRIu32, fixing the build when
> additional format warnings were enabled.
>
> Fixes: cb593a832630 ("net/i40e/base: reduce size of time variables")
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Applied, thanks.
--
David Marchand
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-28 12:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-25 12:27 [PATCH] net/i40e/base: fix invalid log format characters Bruce Richardson
2024-10-25 13:21 ` David Marchand
2024-10-25 14:51 ` Bruce Richardson
2024-10-28 12:30 ` David Marchand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).