All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] rangeset: add RANGESETF_no_print flag
@ 2021-11-22  9:28 Oleksandr Andrushchenko
  2021-11-22  9:28 ` [PATCH 2/2] vpci: use named rangeset for BARs Oleksandr Andrushchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Oleksandr Andrushchenko @ 2021-11-22  9:28 UTC (permalink / raw)
  To: xen-devel; +Cc: roger.pau, jbeulich, Oleksandr Andrushchenko

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



^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-11-23  8:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-22  9:28 [PATCH 1/2] rangeset: add RANGESETF_no_print flag Oleksandr Andrushchenko
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

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.