[PATCH v2 2/4] Documentation/printf: struct resource add start == end special case

Ira Weiny posted 4 patches 1 month ago
[PATCH v2 2/4] Documentation/printf: struct resource add start == end special case
Posted by Ira Weiny 1 month ago
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>
---
 Documentation/core-api/printk-formats.rst | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/core-api/printk-formats.rst b/Documentation/core-api/printk-formats.rst
index 14e093da3ccd..552f51046cf3 100644
--- a/Documentation/core-api/printk-formats.rst
+++ b/Documentation/core-api/printk-formats.rst
@@ -209,12 +209,17 @@ Struct Resources
 ::
 
 	%pr	[mem 0x60000000-0x6fffffff flags 0x2200] or
+		[mem 0x60000000 flags 0x2200] or
 		[mem 0x0000000060000000-0x000000006fffffff flags 0x2200]
+		[mem 0x0000000060000000 flags 0x2200]
 	%pR	[mem 0x60000000-0x6fffffff pref] or
+		[mem 0x60000000 pref] or
 		[mem 0x0000000060000000-0x000000006fffffff pref]
+		[mem 0x0000000060000000 pref]
 
 For printing struct resources. The ``R`` and ``r`` specifiers result in a
-printed resource with (R) or without (r) a decoded flags member.
+printed resource with (R) or without (r) a decoded flags member.  If start is
+equal to end only print the start value.
 
 Passed by reference.
 

-- 
2.47.0
Re: [PATCH v2 2/4] Documentation/printf: struct resource add start == end special case
Posted by Petr Mladek 2 weeks, 4 days ago
On Fri 2024-10-25 19:46:54, Ira Weiny wrote:
> 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>

Looks good.

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr
Re: [PATCH v2 2/4] Documentation/printf: struct resource add start == end special case
Posted by Jonathan Cameron 3 weeks, 5 days ago
On Fri, 25 Oct 2024 19:46:54 -0500
Ira Weiny <ira.weiny@intel.com> wrote:

> 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>
FWIW LGTM
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Re: [PATCH v2 2/4] Documentation/printf: struct resource add start == end special case
Posted by Andy Shevchenko 4 weeks ago
On Fri, Oct 25, 2024 at 07:46:54PM -0500, Ira Weiny wrote:
> The code when printing a struct resource will check for start == end and
> only print the start value.
> 
> Document this special case.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
With Best Regards,
Andy Shevchenko