Documentation/core-api/printk-formats.rst

Source file repositories/reference/linux-study-clean/Documentation/core-api/printk-formats.rst

File Facts

System
Linux kernel
Corpus path
Documentation/core-api/printk-formats.rst
Extension
.rst
Size
19771 bytes
Lines
709
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

struct va_format {
		const char *fmt;
		va_list *va;
	};

Implements a "recursive vsnprintf".

Do not use this feature without some mechanism to verify the
correctness of the format string and va_list arguments.

Passed by reference.

Device tree nodes
-----------------

::

	%pOF[fnpPcCF]


For printing device tree node structures. Default behaviour is
equivalent to %pOFf.

	- f - device node full_name
	- n - device node name
	- p - device node phandle
	- P - device node path spec (name + @unit)
	- F - device node flags
	- c - major compatible string
	- C - full compatible string

The separator when using multiple arguments is ':'

Examples::

	%pOF	/foo/bar@0			- Node full name
	%pOFf	/foo/bar@0			- Same as above
	%pOFfp	/foo/bar@0:10			- Node full name + phandle
	%pOFfcF	/foo/bar@0:foo,device:--P-	- Node full name +
	                                          major compatible string +
						  node flags
							D - dynamic
							d - detached
							P - Populated
							B - Populated bus

Passed by reference.

Fwnode handles
--------------

::

	%pfw[fP]

For printing information on an fwnode_handle. The default is to print the full
node name, including the path. The modifiers are functionally equivalent to
%pOF above.

	- f - full name of the node, including the path
	- P - the name of the node including an address (if there is one)

Examples (ACPI)::

	%pfwf	\_SB.PCI0.CIO2.port@1.endpoint@0	- Full node name
	%pfwP	endpoint@0				- Node name

Examples (OF)::

	%pfwf	/ocp@68000000/i2c@48072000/camera@10/port/endpoint - Full name

Annotation

Implementation Notes