Skip to content

Commit

Permalink
drm/i915: add yesno utility function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jani Nikula authored and Daniel Vetter committed Sep 2, 2015
1 parent 79e50a4 commit 42a8ca4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 0 additions & 5 deletions drivers/gpu/drm/i915/i915_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@
unlikely(__ret_warn_on); \
})

static inline const char *yesno(bool v)
{
return v ? "yes" : "no";
}

enum pipe {
INVALID_PIPE = -1,
PIPE_A = 0,
Expand Down
5 changes: 0 additions & 5 deletions drivers/gpu/drm/i915/i915_gpu_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
#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) {
Expand Down

0 comments on commit 42a8ca4

Please sign in to comment.