linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] printk: add macros to simplify handling struct va_format
@ 2025-11-26 11:35 Andrzej Hajda
  2025-11-26 11:35 ` [PATCH 1/3] " Andrzej Hajda
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrzej Hajda @ 2025-11-26 11:35 UTC (permalink / raw)
  To: Petr Mladek, Steven Rostedt, John Ogness, Sergey Senozhatsky,
	Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
	Andrew Morton, Vlastimil Babka, Suren Baghdasaryan, Michal Hocko,
	Brendan Jackman, Johannes Weiner, Zi Yan, Christoph Lameter,
	David Rientjes, Roman Gushchin, Harry Yoo
  Cc: linux-kernel, linux-mm, Andrzej Hajda

This patchset contains patch abstracting out most common bits of va_format uses
into small macro. The macro works as a forwarder of variadic args to va_format
call.
Rough estimates based on dirty cocci script suggests about 180-230 users
could be converted, allowing to remove about 1100-1300 lines of code.
Of course, I do not plan to do it in mass. I just provide two patches to
show the usage and potential.

Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
---
Andrzej Hajda (3):
      printk: add macros to simplify handling struct va_format
      drivers/core: use va_format_call helper
      mm: use va_format_call helper

 drivers/base/core.c    | 32 ++++++--------------------------
 include/linux/printk.h | 30 ++++++++++++++++++++++++++++++
 mm/page_alloc.c        | 14 ++++----------
 mm/slub.c              | 10 +---------
 4 files changed, 41 insertions(+), 45 deletions(-)
---
base-commit: 37a098cc87aafdf4de147851cbf350bb66c51b45
change-id: 20251126-va_format_call-41053ef60fd7

Best regards,
-- 
Andrzej Hajda <andrzej.hajda@intel.com>



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

end of thread, other threads:[~2025-11-26 11:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-26 11:35 [PATCH 0/3] printk: add macros to simplify handling struct va_format Andrzej Hajda
2025-11-26 11:35 ` [PATCH 1/3] " Andrzej Hajda
2025-11-26 11:35 ` [PATCH 2/3] drivers/core: use va_format_call helper Andrzej Hajda
2025-11-26 11:35 ` [PATCH 3/3] mm: " Andrzej Hajda

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