linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrzej Hajda <andrzej.hajda@intel.com>
To: Petr Mladek <pmladek@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	 John Ogness <john.ogness@linutronix.de>,
	 Sergey Senozhatsky <senozhatsky@chromium.org>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 "Rafael J. Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	 Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	 Brendan Jackman <jackmanb@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>,  Zi Yan <ziy@nvidia.com>,
	Christoph Lameter <cl@gentwo.org>,
	 David Rientjes <rientjes@google.com>,
	 Roman Gushchin <roman.gushchin@linux.dev>,
	Harry Yoo <harry.yoo@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	 Andrzej Hajda <andrzej.hajda@intel.com>
Subject: [PATCH 0/3] printk: add macros to simplify handling struct va_format
Date: Wed, 26 Nov 2025 12:35:48 +0100	[thread overview]
Message-ID: <20251126-va_format_call-v1-0-8a604a331730@intel.com> (raw)

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>



             reply	other threads:[~2025-11-26 11:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-26 11:35 Andrzej Hajda [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251126-va_format_call-v1-0-8a604a331730@intel.com \
    --to=andrzej.hajda@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=dakr@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=harry.yoo@oracle.com \
    --cc=jackmanb@google.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=pmladek@suse.com \
    --cc=rafael@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox