tools/net/ynl/samples/page-pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Make a minor change to eliminate a static checker warning. The type
of s->ifc is unsigned int, so the correct format specifier should be
%u instead of %d.
Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
---
tools/net/ynl/samples/page-pool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/net/ynl/samples/page-pool.c b/tools/net/ynl/samples/page-pool.c
index 332f281ee..e5d521320 100644
--- a/tools/net/ynl/samples/page-pool.c
+++ b/tools/net/ynl/samples/page-pool.c
@@ -118,7 +118,7 @@ int main(int argc, char **argv)
name = if_indextoname(s->ifc, ifname);
if (name)
printf("%8s", name);
- printf("[%d]\t", s->ifc);
+ printf("[%u]\t", s->ifc);
}
printf("page pools: %u (zombies: %u)\n",
--
2.27.0
On Tue, 12 Nov 2024 16:39:21 +0800 Luo Yifan wrote: > Make a minor change to eliminate a static checker warning. The type > of s->ifc is unsigned int, so the correct format specifier should be > %u instead of %d. > > Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com> Please repost and CC the netdev@ mailing list
Make a minor change to eliminate a static checker warning. The type
of s->ifc is unsigned int, so the correct format specifier should be
%u instead of %d.
Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
---
tools/net/ynl/samples/page-pool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/net/ynl/samples/page-pool.c b/tools/net/ynl/samples/page-pool.c
index 332f281ee..e5d521320 100644
--- a/tools/net/ynl/samples/page-pool.c
+++ b/tools/net/ynl/samples/page-pool.c
@@ -118,7 +118,7 @@ int main(int argc, char **argv)
name = if_indextoname(s->ifc, ifname);
if (name)
printf("%8s", name);
- printf("[%d]\t", s->ifc);
+ printf("[%u]\t", s->ifc);
}
printf("page pools: %u (zombies: %u)\n",
--
2.27.0
On Wed, Nov 13, 2024 at 09:11:42AM +0800, Luo Yifan wrote: > Make a minor change to eliminate a static checker warning. The type > of s->ifc is unsigned int, so the correct format specifier should be > %u instead of %d. > > Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com> Reviewed-by: Simon Horman <horms@kernel.org>
On Tue, 12 Nov 2024 at 08:39, Luo Yifan <luoyifan@cmss.chinamobile.com> wrote: > > Make a minor change to eliminate a static checker warning. The type > of s->ifc is unsigned int, so the correct format specifier should be > %u instead of %d. You should include netdev@vger.kernel.org on the recipient list and the subject should name the target tree, so it should say [PATCH net-next] unless it is a fix that you want to go to the net tree in which case it would be [PATCH net]. That said, the patch looks good to me. Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
© 2016 - 2025 Red Hat, Inc.