All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: roger.pau@citrix.com, jbeulich@suse.com,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Subject: [PATCH 1/2] rangeset: add RANGESETF_no_print flag
Date: Mon, 22 Nov 2021 11:28:24 +0200	[thread overview]
Message-ID: <20211122092825.2502306-1-andr2000@gmail.com> (raw)

From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

There are range sets which should not be printed, so introduce a flag
which allows marking those as such. Implement relevant logic to skip
such entries while printing.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
---
 xen/common/rangeset.c      | 3 +++
 xen/include/xen/rangeset.h | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/xen/common/rangeset.c b/xen/common/rangeset.c
index 885b6b15c229..939883a1d145 100644
--- a/xen/common/rangeset.c
+++ b/xen/common/rangeset.c
@@ -575,6 +575,9 @@ void rangeset_domain_printk(
 
     list_for_each_entry ( r, &d->rangesets, rangeset_list )
     {
+        if ( r->flags & RANGESETF_no_print )
+            continue;
+
         printk("    ");
         rangeset_printk(r);
         printk("\n");
diff --git a/xen/include/xen/rangeset.h b/xen/include/xen/rangeset.h
index 135f33f6066f..543540a88b6f 100644
--- a/xen/include/xen/rangeset.h
+++ b/xen/include/xen/rangeset.h
@@ -51,6 +51,9 @@ void rangeset_limit(
  /* Pretty-print range limits in hexadecimal. */
 #define _RANGESETF_prettyprint_hex 0
 #define RANGESETF_prettyprint_hex  (1U << _RANGESETF_prettyprint_hex)
+/* Do not print entries marked with this flag. */
+#define _RANGESETF_no_print 1
+#define RANGESETF_no_print  (1U << _RANGESETF_no_print)
 
 bool_t __must_check rangeset_is_empty(
     const struct rangeset *r);
-- 
2.25.1



             reply	other threads:[~2021-11-22  9:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22  9:28 Oleksandr Andrushchenko [this message]
2021-11-22  9:28 ` [PATCH 2/2] vpci: use named rangeset for BARs Oleksandr Andrushchenko
2021-11-22 10:27   ` Roger Pau Monné
2021-11-22 10:43     ` Jan Beulich
2021-11-22 10:50       ` Oleksandr Andrushchenko
2021-11-22 10:53         ` Roger Pau Monné
2021-11-22 10:54         ` Jan Beulich
2021-11-22 10:59           ` Oleksandr Andrushchenko
2021-11-22 11:08             ` Jan Beulich
2021-11-22 11:14               ` Oleksandr Andrushchenko
2021-11-22 11:27 ` [PATCH 1/2] rangeset: add RANGESETF_no_print flag Oleksandr Andrushchenko
2021-11-23  7:38 ` Jan Beulich
2021-11-23  7:49   ` Oleksandr Andrushchenko
2021-11-23  8:01     ` Jan Beulich
2021-11-23  8:04       ` Oleksandr Andrushchenko

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=20211122092825.2502306-1-andr2000@gmail.com \
    --to=andr2000@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.