Merge tag 'printk-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/printk...
[linux-2.6-microblaze.git] / Documentation / core-api / printk-formats.rst
index 7b6bfd8..4346ae1 100644 (file)
@@ -37,14 +37,13 @@ Integer types
                u64                     %llu or %llx
 
 
-If <type> is dependent on a config option for its size (e.g., sector_t,
-blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a
-format specifier of its largest possible type and explicitly cast to it.
+If <type> is architecture-dependent for its size (e.g., cycles_t, tcflag_t) or
+is dependent on a config option for its size (e.g., blk_status_t), use a format
+specifier of its largest possible type and explicitly cast to it.
 
 Example::
 
-       printk("test: sector number/total blocks: %llu/%llu\n",
-               (unsigned long long)sector, (unsigned long long)blockcount);
+       printk("test: latency: %llu cycles\n", (unsigned long long)time);
 
 Reminder: sizeof() returns type size_t.
 
@@ -596,6 +595,24 @@ For printing netdev_features_t.
 
 Passed by reference.
 
+V4L2 and DRM FourCC code (pixel format)
+---------------------------------------
+
+::
+
+       %p4cc
+
+Print a FourCC code used by V4L2 or DRM, including format endianness and
+its numerical value as hexadecimal.
+
+Passed by reference.
+
+Examples::
+
+       %p4cc   BG12 little-endian (0x32314742)
+       %p4cc   Y10  little-endian (0x20303159)
+       %p4cc   NV12 big-endian (0xb231564e)
+
 Thanks
 ======