All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/printer: Add drm_vprintf()
@ 2017-11-21  9:39 Chris Wilson
  2017-11-21  9:39 ` [PATCH 2/6] drm/i915: Use snprintf to avoid line-break when pretty-printing engines Chris Wilson
                   ` (12 more replies)
  0 siblings, 13 replies; 19+ messages in thread
From: Chris Wilson @ 2017-11-21  9:39 UTC (permalink / raw)
  To: intel-gfx; +Cc: Dave Airlie

Simple va_args equivalent to the existing drm_printf() for use with the
drm_printer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rob Clark <robdclark@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/drm_print.c |  5 +----
 include/drm/drm_print.h     | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
index 82ff327eb2df..781518fd88e3 100644
--- a/drivers/gpu/drm/drm_print.c
+++ b/drivers/gpu/drm/drm_print.c
@@ -55,13 +55,10 @@ EXPORT_SYMBOL(__drm_printfn_debug);
  */
 void drm_printf(struct drm_printer *p, const char *f, ...)
 {
-	struct va_format vaf;
 	va_list args;
 
 	va_start(args, f);
-	vaf.fmt = f;
-	vaf.va = &args;
-	p->printfn(p, &vaf);
+	drm_vprintf(p, f, &args);
 	va_end(args);
 }
 EXPORT_SYMBOL(drm_printf);
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index 0968e411f562..e04d99cdc8d2 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -80,6 +80,21 @@ void __drm_printfn_debug(struct drm_printer *p, struct va_format *vaf);
 __printf(2, 3)
 void drm_printf(struct drm_printer *p, const char *f, ...);
 
+/*
+ * drm_vprintf - print to a &drm_printer stream
+ * @p: the &drm_printer
+ * @f: format string
+ * @args: the va_list
+ */
+__printf(2, 0)
+static inline void
+drm_vprintf(struct drm_printer *p, const char *fmt, va_list *va)
+{
+	struct va_format vaf = { .fmt = fmt, .va = va };
+
+	p->printfn(p, &vaf);
+}
+
 /**
  * drm_printf_indent - Print to a &drm_printer stream with indentation
  * @printer: DRM printer
-- 
2.15.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-11-22 14:28 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-21  9:39 [PATCH 1/6] drm/printer: Add drm_vprintf() Chris Wilson
2017-11-21  9:39 ` [PATCH 2/6] drm/i915: Use snprintf to avoid line-break when pretty-printing engines Chris Wilson
2017-11-22  9:12   ` Mika Kuoppala
2017-11-21  9:39 ` [PATCH 3/6] drm/i915: Make engine state pretty-printer header configurable Chris Wilson
2017-11-21  9:39 ` [PATCH 4/6] drm/i915: Include engine state on detecting a missed breadcrumb/seqno Chris Wilson
2017-11-22  9:29   ` Mika Kuoppala
2017-11-21  9:39 ` [PATCH 5/6] drm/i915: Include the global reset count for intel_engine_dump() Chris Wilson
2017-11-22  9:50   ` Mika Kuoppala
2017-11-21  9:39 ` [PATCH 6/6] drm/i915: Add is-wedged flag to intel_engine_dump() Chris Wilson
2017-11-21 10:13 ` ✓ Fi.CI.BAT: success for series starting with [1/6] drm/printer: Add drm_vprintf() Patchwork
2017-11-21 10:57 ` ✓ Fi.CI.IGT: " Patchwork
2017-11-21 11:21 ` [PATCH v2] " Chris Wilson
2017-11-21 12:04   ` Michal Wajdeczko
2017-11-21 12:25     ` Chris Wilson
2017-11-21 13:07 ` ✓ Fi.CI.BAT: success for series starting with [v2] drm/printer: Add drm_vprintf() (rev2) Patchwork
2017-11-21 14:50 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-11-22 10:55 ` [PATCH v3] drm/printer: Add drm_vprintf() Chris Wilson
2017-11-22 11:20 ` ✓ Fi.CI.BAT: success for series starting with [v3] drm/printer: Add drm_vprintf() (rev3) Patchwork
2017-11-22 14:28 ` ✗ Fi.CI.IGT: warning " Patchwork

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.