drm/i915: add yesno utility function
authorJani Nikula <jani.nikula@intel.com>
Thu, 27 Aug 2015 13:23:30 +0000 (16:23 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 2 Sep 2015 09:16:44 +0000 (11:16 +0200)
Add a common function to return "yes" or "no" string based on the
argument, and drop the local versions of it.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gpu_error.c

index 624024c288aa25273c49bdbe363b33136c997c65..2f1b693d7162cdb92db6c3018e86a7dd0b05ffa2 100644 (file)
@@ -46,11 +46,6 @@ enum {
        PINNED_LIST,
 };
 
-static const char *yesno(int v)
-{
-       return v ? "yes" : "no";
-}
-
 /* As the drm_debugfs_init() routines are called before dev->dev_private is
  * allocated we need to hook into the minor for release. */
 static int
index d2c444971679f51dbde1a2e0dce3c43e8a28dea4..1d99402e4a1e7f6f0a269eee9d6d678be923edbe 100644 (file)
        unlikely(__ret_warn_on);                                        \
 })
 
+static inline const char *yesno(bool v)
+{
+       return v ? "yes" : "no";
+}
+
 enum pipe {
        INVALID_PIPE = -1,
        PIPE_A = 0,
index 493e9b294a69028098b550ddcb996d0556e70f25..3379f9c1ef88a056481042cade8acb87ac78f15a 100644 (file)
 #include <generated/utsrelease.h>
 #include "i915_drv.h"
 
-static const char *yesno(int v)
-{
-       return v ? "yes" : "no";
-}
-
 static const char *ring_str(int ring)
 {
        switch (ring) {