* [PATCH v2 1/4] drm/managed: Use special gfp_t format specifier
2026-03-26 12:31 [PATCH v2 0/4] treewide: fixup gfp_t printks Brendan Jackman
@ 2026-03-26 12:31 ` Brendan Jackman
2026-03-26 12:31 ` [PATCH v2 2/4] iwlegacy: 3945-mac: Fixup allocation failure log Brendan Jackman
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Brendan Jackman @ 2026-03-26 12:31 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Stanislaw Gruszka, Alexander Potapenko,
Marco Elver, Dmitry Vyukov, Andrew Morton, Allison Henderson,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman
Cc: dri-devel, linux-kernel, linux-wireless, kasan-dev, linux-mm,
netdev, linux-rdma, rds-devel, Brendan Jackman
%pGg produces nice readable output and decouples the format string from
the size of gfp_t.
Signed-off-by: Brendan Jackman <jackmanb@google.com>
---
drivers/gpu/drm/drm_managed.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_managed.c b/drivers/gpu/drm/drm_managed.c
index 247f468731de0..a9da94319b052 100644
--- a/drivers/gpu/drm/drm_managed.c
+++ b/drivers/gpu/drm/drm_managed.c
@@ -232,8 +232,8 @@ void *drmm_kmalloc(struct drm_device *dev, size_t size, gfp_t gfp)
dr = alloc_dr(NULL, size, gfp, dev_to_node(dev->dev));
if (!dr) {
- drm_dbg_drmres(dev, "failed to allocate %zu bytes, %u flags\n",
- size, gfp);
+ drm_dbg_drmres(dev, "failed to allocate %zu bytes, %pGg\n",
+ size, &gfp);
return NULL;
}
dr->node.name = kstrdup_const("kmalloc", gfp);
--
2.51.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 2/4] iwlegacy: 3945-mac: Fixup allocation failure log
2026-03-26 12:31 [PATCH v2 0/4] treewide: fixup gfp_t printks Brendan Jackman
2026-03-26 12:31 ` [PATCH v2 1/4] drm/managed: Use special gfp_t format specifier Brendan Jackman
@ 2026-03-26 12:31 ` Brendan Jackman
2026-03-26 12:31 ` [PATCH v2 3/4] mm/kfence: Use special gfp_t format specifier Brendan Jackman
2026-03-26 12:32 ` [PATCH v2 4/4] net/rds: " Brendan Jackman
3 siblings, 0 replies; 5+ messages in thread
From: Brendan Jackman @ 2026-03-26 12:31 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Stanislaw Gruszka, Alexander Potapenko,
Marco Elver, Dmitry Vyukov, Andrew Morton, Allison Henderson,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman
Cc: dri-devel, linux-kernel, linux-wireless, kasan-dev, linux-mm,
netdev, linux-rdma, rds-devel, Brendan Jackman
Fix 2 issues spotted by AI[0]:
1. Missing space after the full stop.
2. Wrong GFP flags are printed.
And also switch to %pGg for the GFP flags. This produces nice readable
output and decouples the format string from the size of gfp_t.
[0] https://sashiko.dev/#/patchset/20260319-gfp64-v1-0-2c73b8d42b7f%40google.com
Signed-off-by: Brendan Jackman <jackmanb@google.com>
---
drivers/net/wireless/intel/iwlegacy/3945-mac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
index c148654aa9533..88b31e0b9568c 100644
--- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
@@ -1002,9 +1002,9 @@ il3945_rx_allocate(struct il_priv *il, gfp_t priority)
D_INFO("Failed to allocate SKB buffer.\n");
if (rxq->free_count <= RX_LOW_WATERMARK &&
net_ratelimit())
- IL_ERR("Failed to allocate SKB buffer with %0x."
+ IL_ERR("Failed to allocate SKB buffer with %pGg. "
"Only %u free buffers remaining.\n",
- priority, rxq->free_count);
+ &gfp_mask, rxq->free_count);
/* We don't reschedule replenish work here -- we will
* call the restock method and if it still needs
* more buffers it will schedule replenish */
--
2.51.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 3/4] mm/kfence: Use special gfp_t format specifier
2026-03-26 12:31 [PATCH v2 0/4] treewide: fixup gfp_t printks Brendan Jackman
2026-03-26 12:31 ` [PATCH v2 1/4] drm/managed: Use special gfp_t format specifier Brendan Jackman
2026-03-26 12:31 ` [PATCH v2 2/4] iwlegacy: 3945-mac: Fixup allocation failure log Brendan Jackman
@ 2026-03-26 12:31 ` Brendan Jackman
2026-03-26 12:32 ` [PATCH v2 4/4] net/rds: " Brendan Jackman
3 siblings, 0 replies; 5+ messages in thread
From: Brendan Jackman @ 2026-03-26 12:31 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Stanislaw Gruszka, Alexander Potapenko,
Marco Elver, Dmitry Vyukov, Andrew Morton, Allison Henderson,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman
Cc: dri-devel, linux-kernel, linux-wireless, kasan-dev, linux-mm,
netdev, linux-rdma, rds-devel, Brendan Jackman
%pGg produces nice readable output and decouples the format string from
the size of gfp_t.
Signed-off-by: Brendan Jackman <jackmanb@google.com>
---
mm/kfence/kfence_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/kfence/kfence_test.c b/mm/kfence/kfence_test.c
index 5725a367246d9..10424cd25e5a6 100644
--- a/mm/kfence/kfence_test.c
+++ b/mm/kfence/kfence_test.c
@@ -263,7 +263,7 @@ static void *test_alloc(struct kunit *test, size_t size, gfp_t gfp, enum allocat
break;
}
- kunit_info(test, "%s: size=%zu, gfp=%x, policy=%s, cache=%i\n", __func__, size, gfp,
+ kunit_info(test, "%s: size=%zu, gfp=%pGg, policy=%s, cache=%i\n", __func__, size, &gfp,
policy_name, !!test_cache);
/*
--
2.51.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 4/4] net/rds: Use special gfp_t format specifier
2026-03-26 12:31 [PATCH v2 0/4] treewide: fixup gfp_t printks Brendan Jackman
` (2 preceding siblings ...)
2026-03-26 12:31 ` [PATCH v2 3/4] mm/kfence: Use special gfp_t format specifier Brendan Jackman
@ 2026-03-26 12:32 ` Brendan Jackman
3 siblings, 0 replies; 5+ messages in thread
From: Brendan Jackman @ 2026-03-26 12:32 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Stanislaw Gruszka, Alexander Potapenko,
Marco Elver, Dmitry Vyukov, Andrew Morton, Allison Henderson,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman
Cc: dri-devel, linux-kernel, linux-wireless, kasan-dev, linux-mm,
netdev, linux-rdma, rds-devel, Brendan Jackman
%pGg produces nice readable output and decouples the format string from
the size of gfp_t.
Signed-off-by: Brendan Jackman <jackmanb@google.com>
---
net/rds/tcp_recv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c
index 49f96ee0c40f6..ffe843ca219c7 100644
--- a/net/rds/tcp_recv.c
+++ b/net/rds/tcp_recv.c
@@ -275,7 +275,7 @@ static int rds_tcp_read_sock(struct rds_conn_path *cp, gfp_t gfp)
desc.count = 1; /* give more than one skb per call */
tcp_read_sock(sock->sk, &desc, rds_tcp_data_recv);
- rdsdebug("tcp_read_sock for tc %p gfp 0x%x returned %d\n", tc, gfp,
+ rdsdebug("tcp_read_sock for tc %p gfp %pGg returned %d\n", tc, &gfp,
desc.error);
if (skb_queue_empty_lockless(&sock->sk->sk_receive_queue) &&
--
2.51.2
^ permalink raw reply related [flat|nested] 5+ messages in thread