mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aditya Garg <gargaditya08@live.com>
To: Petr Mladek <pmladek@suse.com>,
	"keescook@chromium.org" <keescook@chromium.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Sven Peter <sven@svenpeter.dev>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Aun-Ali Zaidi <admin@kodeit.net>,
	Maxime Ripard <mripard@kernel.org>,
	"airlied@redhat.com" <airlied@redhat.com>,
	Simona Vetter <simona@ffwll.ch>,
	Steven Rostedt <rostedt@goodmis.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	"apw@canonical.com" <apw@canonical.com>,
	"joe@perches.com" <joe@perches.com>,
	"dwaipayanray1@gmail.com" <dwaipayanray1@gmail.com>,
	"lukas.bulwahn@gmail.com" <lukas.bulwahn@gmail.com>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	Hector Martin <marcan@marcan.st>,
	Asahi Linux Mailing List <asahi@lists.linux.dev>
Subject: Re: [PATCH v2 1/2] lib/vsprintf: Add support for generic FourCCs by extending %p4cc
Date: Fri, 14 Mar 2025 03:49:48 +0000	[thread overview]
Message-ID: <496BFAE9-8BCE-4617-BEA6-71CD5F03B37D@live.com> (raw)
In-Reply-To: <79FA3F41-FD7A-41D9-852B-D32606AF5EB4@live.com>



> On 13 Mar 2025, at 4:49 PM, Aditya Garg <gargaditya08@live.com> wrote:
> 
> From: Hector Martin <marcan@marcan.st>
> 
> %p4cc is designed for DRM/V4L2 FourCCs with their specific quirks, but
> it's useful to be able to print generic 4-character codes formatted as
> an integer. Extend it to add format specifiers for printing generic
> 32-bit FourCCs with various endian semantics:
> 
> %p4ch Host byte order
> %p4cn Network byte order
> %p4cl Little-endian
> %p4cb Big-endian
> 
> The endianness determines how bytes are interpreted as a u32, and the
> FourCC is then always printed MSByte-first (this is the opposite of
> V4L/DRM FourCCs). This covers most practical cases, e.g. %p4cn would
> allow printing LSByte-first FourCCs stored in host endian order
> (other than the hex form being in character order, not the integer
> value).
> 
> Acked-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Reviewed-by: Petr Mladek <pmladek@suse.com>
> Tested-by: Petr Mladek <pmladek@suse.com>
> Signed-off-by: Hector Martin <marcan@marcan.st>
> Signed-off-by: Aditya Garg <gargaditya08@live.com>
> ---
> Documentation/core-api/printk-formats.rst | 32 +++++++++++++++++++++
> lib/vsprintf.c                            | 35 +++++++++++++++++++----
> scripts/checkpatch.pl                     |  2 +-
> 3 files changed, 62 insertions(+), 7 deletions(-)

FWIW, the test_printf.c part, as suggested by Petr, which was removed in v2, has been sent to Kees here:

https://lore.kernel.org/lkml/4378DDFE-3263-497A-8364-433DC1984FEE@live.com/T/#u

The series should be good to merge now.

  reply	other threads:[~2025-03-14  3:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13 11:18 [PATCH v2 0/2] Use proper printk format in appletbdrm Aditya Garg
2025-03-13 11:19 ` [PATCH v2 1/2] lib/vsprintf: Add support for generic FourCCs by extending %p4cc Aditya Garg
2025-03-14  3:49   ` Aditya Garg [this message]
2025-03-13 11:20 ` [PATCH v2 2/2] drm/appletbdrm: use %p4cl instead of %p4cc Aditya Garg
2025-03-13 14:29 ` [PATCH v2 0/2] Use proper printk format in appletbdrm Alyssa Rosenzweig
2025-03-21 13:29 ` Aditya Garg

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=496BFAE9-8BCE-4617-BEA6-71CD5F03B37D@live.com \
    --to=gargaditya08@live.com \
    --cc=admin@kodeit.net \
    --cc=airlied@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alyssa@rosenzweig.io \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=apw@canonical.com \
    --cc=asahi@lists.linux.dev \
    --cc=corbet@lwn.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=keescook@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=lukas.bulwahn@gmail.com \
    --cc=marcan@marcan.st \
    --cc=mripard@kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=simona@ffwll.ch \
    --cc=sven@svenpeter.dev \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®