Re: [PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs

From
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date
2021-02-09 10:20:50
Also in
dri-devel, lkml
Reply to
Andy Shevchenko, 2021-02-08
On Mon, Feb 08, 2021 at 10:58:55PM +0200, Andy Shevchenko wrote:
On Mon, Feb 08, 2021 at 10:43:30PM +0200, Andy Shevchenko wrote:
quoted
On Mon, Feb 8, 2021 at 10:11 PM Sakari Ailus
[off-list ref] wrote:
...
__le32 val;

val = cpu_to_le32(*fourcc & ~BIT(31));

p += string_escape_mem(&val, sizeof(*fourcc), output, sizeof(output), ESCAPE_NP | ESCAPE_HEX, NULL);
sizeof(val) and as we are discussing in parallel emails something like
skip_trailing_spaces() to be applied after above.

The rationale of the above, that we reuse existing code and existing standard
for the escaping non-printable characters.

-- 
With Best Regards,
Andy Shevchenko

Thread (17 messages) 17 messages, 5 authors, last reply 2021-02-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help