Skip to content

Commit

Permalink
drm/i915: Convert i915_gem_object_ops->flags values to use BIT()
Browse files Browse the repository at this point in the history
Having just watched someone add a new value, 0x3, without realising that
the flags were bit values, I have come to appreciate the value in using
BIT.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170523103116.32239-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
  • Loading branch information
Chris Wilson committed May 24, 2017
1 parent ca83d58 commit 22284f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/i915_gem_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@

struct drm_i915_gem_object_ops {
unsigned int flags;
#define I915_GEM_OBJECT_HAS_STRUCT_PAGE 0x1
#define I915_GEM_OBJECT_IS_SHRINKABLE 0x2
#define I915_GEM_OBJECT_HAS_STRUCT_PAGE BIT(0)
#define I915_GEM_OBJECT_IS_SHRINKABLE BIT(1)

/* Interface between the GEM object and its backing storage.
* get_pages() is called once prior to the use of the associated set
Expand Down

0 comments on commit 22284f4

Please sign in to comment.