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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 19, 2022 at 12:00:23PM +0200, Petr Mladek wrote:
> On Tue 2022-09-06 14:19:44, Russell King wrote:
> > From: Hector Martin <marcan@xxxxxxxxx>
> > 
... 
> > +Generic FourCC code
> > +-------------------
> > +
> > +::
> > +	%p4c[hnbl]	gP00 (0x67503030)
> > +
> > +Print a generic FourCC code, as both ASCII characters and its numerical
> > +value as hexadecimal.
> > +
> > +The additional ``h``, ``r``, ``b``, and ``l`` specifiers are used to specify
> > +host, reversed, big or little endian order data respectively. Host endian
> > +order means the data is interpreted as a 32-bit integer and the most
> > +significant byte is printed first; that is, the character code as printed
> > +matches the byte order stored in memory on big-endian systems, and is reversed
> > +on little-endian systems.
> > +
> > +Passed by reference.
> > +
> > +Examples for a little-endian machine, given &(u32)0x67503030::
> > +
> > +	%p4ch	gP00 (0x67503030)
> > +	%p4cl	gP00 (0x67503030)
> > +	%p4cb	00Pg (0x30305067)
> > +	%p4cr	00Pg (0x30305067)
> 
> Nit: I would prefer to keep the same order (h,r,b,l) everywhere.
> 
>      I guess that you wanted to show exactly the same results next
>      to each other. But it is not the case on big-endian anyway.

This is straight from the Asahi kernel tree, and is unmodified. I'm
guessing you're use of "you" here refers to Hector rather than me.

So, Hector, any opinions on Petr's comments please?

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux