Skip to content

Commit 059f6fc

Browse files
committed
drm/xe/display: use xe && 0 to avoid warnings about unused variables
Avoid warnings about unused variables when the IS_LP(), IS_GEN9_LP(), and IS_GEN9_BC() macros are the only users of a variable. This is not currently the case, but prepare for future changes. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/2a9960df4d9f6423a2cc6a29a7a7b0c1420690c7.1725012870.git.jani.nikula@intel.com
1 parent fcba2ed commit 059f6fc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ static inline struct drm_i915_private *to_i915(const struct drm_device *dev)
7575

7676
#define IS_MOBILE(xe) (xe && 0)
7777

78-
#define IS_LP(xe) (0)
79-
#define IS_GEN9_LP(xe) (0)
80-
#define IS_GEN9_BC(xe) (0)
78+
#define IS_LP(xe) ((xe) && 0)
79+
#define IS_GEN9_LP(xe) ((xe) && 0)
80+
#define IS_GEN9_BC(xe) ((xe) && 0)
8181

8282
#define IS_TIGERLAKE_UY(xe) (xe && 0)
8383
#define IS_COMETLAKE_ULX(xe) (xe && 0)

0 commit comments

Comments
 (0)