Thread (24 messages) 24 messages, 12 authors, 2022-10-24

Re: [PATCH 4/7] lib/vsprintf: Add support for generic FOURCCs by extending %p4cc

From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date: 2022-09-06 22:11:32
Also in: asahi, linux-devicetree, linux-doc, linux-gpio

On 06/09/2022 15.19, Russell King (Oracle) wrote:
From: Hector Martin <redacted>

%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:
 Documentation/core-api/printk-formats.rst | 32 +++++++++++++++++++++
 lib/vsprintf.c                            | 35 +++++++++++++++++++----
 2 files changed, 61 insertions(+), 6 deletions(-)
Please also update lib/test_printf.c with a few test cases when
modifying/extending vsnprintf().
quoted hunk ↗ jump to hunk
diff --git a/Documentation/core-api/printk-formats.rst b/Documentation/core-api/printk-formats.rst
index 5e89497ba314..22c33398ec02 100644
--- a/Documentation/core-api/printk-formats.rst
+++ b/Documentation/core-api/printk-formats.rst
@@ -625,6 +625,38 @@ Passed by reference.
 	%p4cc	Y10  little-endian (0x20303159)
 	%p4cc	NV12 big-endian (0xb231564e)
 
+Generic FourCC code
+-------------------
+
+::
+	%p4c[hnbl]	gP00 (0x67503030)
+
Typo, I think. hrbl ?

Rasmus

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help