[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241025-cxl-pra-v2-0-123a825daba2@intel.com>
Date: Fri, 25 Oct 2024 19:46:52 -0500
From: Ira Weiny <ira.weiny@...el.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Petr Mladek <pmladek@...e.com>, Steven Rostedt <rostedt@...dmis.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Jonathan Corbet <corbet@....net>, Davidlohr Bueso <dave@...olabs.net>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
Dave Jiang <dave.jiang@...el.com>,
Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Dan Williams <dan.j.williams@...el.com>
Cc: Fan Ni <fan.ni@...sung.com>, Bagas Sanjaya <bagasdotme@...il.com>,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-cxl@...r.kernel.org, Ira Weiny <ira.weiny@...el.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: [PATCH v2 0/4] printf: Add struct range print specifier
Support for the Compute Express Link (CXL) Dynamic Capacity Devices
(DCD) have grown a number of uses to print struct range.[1] Support for
a printf specifier '%pra' was being worked within a large series and has
garnered a number of comments and discussion.
To better accelerate both features introduce a separate series to settle
the struct range print enhancement divorced from the CXL DCD feature.
Struct range is used to store a number range similar to struct resource.
Printing struct range becomes cumbersome having to specify 2 specifiers
and the members of the struct. Furthermore, print output benefits from
using a standardized format.
Add to the pointer specifier support for struct range. Share code with
struct resource for more standardization. Add tests for struct resource
to help prevent regressions.
%pra was settled on as the most reasonable format in previous
discussions.[2]
Link: https://lore.kernel.org/all/20241007-dcd-type2-upstream-v4-2-c261ee6eeded@intel.com/ [1]
Link: https://lore.kernel.org/all/66cea3bf3332f_f937b29424@iweiny-mobl.notmuch/ [2]
Signed-off-by: Ira Weiny <ira.weiny@...el.com>
---
Changes in v2:
- Andy: s/resource_and_range/resource_or_range/
- djbw/Petr: Address comments on documentation
- Link to v1: https://patch.msgid.link/20241018-cxl-pra-v1-0-7f49ba58208b@intel.com
---
Ira Weiny (4):
test printf: Add very basic struct resource tests
Documentation/printf: struct resource add start == end special case
printf: Add print format (%pra) for struct range
cxl/cdat: Use %pra for dpa range outputs
Documentation/core-api/printk-formats.rst | 20 +++++++++-
drivers/cxl/core/cdat.c | 8 ++--
include/linux/range.h | 6 +++
lib/test_printf.c | 61 +++++++++++++++++++++++++++++++
lib/vsprintf.c | 57 ++++++++++++++++++++++++++---
5 files changed, 141 insertions(+), 11 deletions(-)
---
base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc
change-id: 20240930-cxl-pra-53956ac5fc1e
Best regards,
--
Ira Weiny <ira.weiny@...el.com>
Powered by blists - more mailing lists