diff options
Diffstat (limited to 'lib/test_printf.c')
-rw-r--r-- | lib/test_printf.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/test_printf.c b/lib/test_printf.c index 7ac87f18a10f..7ee0b4e17b21 100644 --- a/lib/test_printf.c +++ b/lib/test_printf.c @@ -649,6 +649,23 @@ static void __init fwnode_pointer(void) software_node_unregister(&softnodes[0]); } +static void __init fourcc_pointer(void) +{ + struct { + u32 code; + char *str; + } const try[] = { + { 0x3231564e, "NV12 little-endian (0x3231564e)", }, + { 0xb231564e, "NV12 big-endian (0xb231564e)", }, + { 0x10111213, ".... little-endian (0x10111213)", }, + { 0x20303159, "Y10 little-endian (0x20303159)", }, + }; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(try); i++) + test(try[i].str, "%p4cc", &try[i].code); +} + static void __init errptr(void) { @@ -694,6 +711,7 @@ test_pointer(void) flags(); errptr(); fwnode_pointer(); + fourcc_pointer(); } static void __init selftest(void) |