Skip to content

Commit 3dff66f

Browse files
weiny2davejiang
authored andcommitted
Documentation/printf: struct resource add start == end special case
The code when printing a struct resource will check for start == end and only print the start value. Document this special case. Suggested-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241025-cxl-pra-v2-2-123a825daba2@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
1 parent 8e7f07e commit 3dff66f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Documentation/core-api/printk-formats.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,17 @@ Struct Resources
209209
::
210210

211211
%pr [mem 0x60000000-0x6fffffff flags 0x2200] or
212+
[mem 0x60000000 flags 0x2200] or
212213
[mem 0x0000000060000000-0x000000006fffffff flags 0x2200]
214+
[mem 0x0000000060000000 flags 0x2200]
213215
%pR [mem 0x60000000-0x6fffffff pref] or
216+
[mem 0x60000000 pref] or
214217
[mem 0x0000000060000000-0x000000006fffffff pref]
218+
[mem 0x0000000060000000 pref]
215219

216220
For printing struct resources. The ``R`` and ``r`` specifiers result in a
217-
printed resource with (R) or without (r) a decoded flags member.
221+
printed resource with (R) or without (r) a decoded flags member. If start is
222+
equal to end only print the start value.
218223

219224
Passed by reference.
220225

0 commit comments

Comments
 (0)