Linux CXL
 help / color / mirror / Atom feed
From: Ira Weiny <ira.weiny@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	 Petr Mladek <pmladek@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	 Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	 Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	 Sergey Senozhatsky <senozhatsky@chromium.org>,
	 Jonathan Corbet <corbet@lwn.net>,
	Davidlohr Bueso <dave@stgolabs.net>,
	 Jonathan Cameron <jonathan.cameron@huawei.com>,
	 Dave Jiang <dave.jiang@intel.com>,
	 Alison Schofield <alison.schofield@intel.com>,
	 Vishal Verma <vishal.l.verma@intel.com>,
	 Dan Williams <dan.j.williams@intel.com>
Cc: Fan Ni <fan.ni@samsung.com>, Bagas Sanjaya <bagasdotme@gmail.com>,
	 linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	 linux-cxl@vger.kernel.org, Ira Weiny <ira.weiny@intel.com>,
	 Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: [PATCH v2 0/4] printf: Add struct range print specifier
Date: Fri, 25 Oct 2024 19:46:52 -0500	[thread overview]
Message-ID: <20241025-cxl-pra-v2-0-123a825daba2@intel.com> (raw)

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@intel.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@intel.com>


             reply	other threads:[~2024-10-26  0:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-26  0:46 Ira Weiny [this message]
2024-10-26  0:46 ` [PATCH v2 1/4] test printf: Add very basic struct resource tests Ira Weiny
2024-10-28  9:07   ` Andy Shevchenko
2024-10-28 21:29     ` Ira Weiny
2024-10-26  0:46 ` [PATCH v2 2/4] Documentation/printf: struct resource add start == end special case Ira Weiny
2024-10-28  9:07   ` Andy Shevchenko
2024-10-29 15:19   ` Jonathan Cameron
2024-11-07 12:34   ` Petr Mladek
2024-10-26  0:46 ` [PATCH v2 3/4] printf: Add print format (%pra) for struct range Ira Weiny
2024-10-28  9:11   ` Andy Shevchenko
2024-11-07 14:24   ` Petr Mladek
2024-10-26  0:46 ` [PATCH v2 4/4] cxl/cdat: Use %pra for dpa range outputs Ira Weiny
2024-10-30 10:51 ` [PATCH v2 0/4] printf: Add struct range print specifier metux
2024-10-31 21:34   ` Ira Weiny
2024-11-07 14:43   ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241025-cxl-pra-v2-0-123a825daba2@intel.com \
    --to=ira.weiny@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=alison.schofield@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bagasdotme@gmail.com \
    --cc=corbet@lwn.net \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=fan.ni@samsung.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox