Re: [kvm-unit-tests PATCH v3 5/9] s390x: Library resources for CSS tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2019-12-09 12:49, Thomas Huth wrote:
On 06/12/2019 17.26, Pierre Morel wrote:
These are the include and library utilities for the css tests patch
series.

Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
---
  lib/s390x/css.h      | 259 +++++++++++++++++++++++++++++++++++++++++++
  lib/s390x/css_dump.c | 156 ++++++++++++++++++++++++++
  2 files changed, 415 insertions(+)
  create mode 100644 lib/s390x/css.h
  create mode 100644 lib/s390x/css_dump.c

diff --git a/lib/s390x/css.h b/lib/s390x/css.h
new file mode 100644
index 0000000..6f19bb5
--- /dev/null
+++ b/lib/s390x/css.h
[...]
+/* Debug functions */
+char *dump_pmcw_flags(uint16_t f);
+char *dump_scsw_flags(uint32_t f);
+#undef DEBUG
+#ifdef DEBUG
+void dump_scsw(struct scsw *);
+void dump_irb(struct irb *irbp);
+void dump_schib(struct schib *sch);
+struct ccw *dump_ccw(struct ccw *cp);
+#else
+static inline void dump_scsw(struct scsw *scsw) {}
+static inline void dump_irb(struct irb *irbp) {}
+static inline void dump_pmcw(struct pmcw *p) {}
+static inline void dump_schib(struct schib *sch) {}
+static inline void dump_orb(struct orb *op) {}
+static inline struct ccw *dump_ccw(struct ccw *cp)
+{
+	return NULL;
+}
+#endif

I'd prefer to not have a "#undef DEBUG" (or "#define DEBUG") statement
in the header here - it could trigger unexpected behavior with other
files that also use a DEBUG macro.

Could you please declare the prototypes here and move the "#else" part
to the .c file instead? Thanks!

  Thomas


Yes, I can do this.
Thanks
Pierre


--
Pierre Morel
IBM Lab Boeblingen




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux