> Does this look good now? Made orig a union.
Wait, it's messier. Maybe declare data type of val separately in each case?
>
> char *fourcc_string(char *buf, char *end, const u32 *fourcc, const char *fmt,
> struct printf_spec spec)
> {
> char output[sizeof("0123 little-endian (0x01234567)")];
>
On Fri, Feb 21, 2025 at 08:06:51PM +, Aditya Garg wrote:
>
> > Does this look good now? Made orig a union.
>
> Wait, it's messier. Maybe declare data type of val separately in each case?
Yes, this sounds better.
--
With Best Regards,
Andy Shevchenko
> On 21 Feb 2025, at 8:57 PM, andriy.shevche...@linux.intel.com wrote:
>
> On Thu, Feb 20, 2025 at 04:39:23PM +, Aditya Garg wrote:
>> From: Hector Martin
>>
>> %p4cc is designed for DRM/V4L2 FOURCCs with their specific quirks, but
>> it's useful to be able to print generic 4-character cod
On Thu, Feb 20, 2025 at 04:39:23PM +, Aditya Garg wrote:
> From: Hector Martin
>
> %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 gene
Hi
>
>>
>> diff --git a/lib/test_printf.c b/lib/test_printf.c
>> index 59dbe4f9a..ee860327e 100644
>> --- a/lib/test_printf.c
>> +++ b/lib/test_printf.c
>> @@ -776,21 +776,46 @@ static void __init fwnode_pointer(void)
>> software_node_unregister_node_group(group);
>> }
>>
>> +struct fourcc_stru
On Thu, Feb 20 2025, Aditya Garg wrote:
> v2 -> Add this patch
> Documentation/core-api/printk-formats.rst | 32 +++
> lib/test_printf.c | 39 +++
> lib/vsprintf.c| 38 ++
Yay! Thanks for
From: Hector Martin
%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-endian