diff mbox series

[RFC,26/28] drm/i915: Use IS_GEN in intel_guc.c

Message ID 20210414115028.168504-27-tvrtko.ursulin@linux.intel.com (mailing list archive)
State New
Headers show
Series Old platform/gen kconfig options series | expand

Commit Message

Tvrtko Ursulin April 14, 2021, 11:50 a.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_guc.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c
index 21140ccd7a97..e67283947624 100644
--- a/drivers/gpu/drm/i915/intel_guc.c
+++ b/drivers/gpu/drm/i915/intel_guc.c
@@ -208,14 +208,10 @@  static u32 get_gt_type(struct drm_i915_private *dev_priv)
 
 static u32 get_core_family(struct drm_i915_private *dev_priv)
 {
-	u32 gen = INTEL_GEN(dev_priv);
-
-	switch (gen) {
-	case 9:
+	if (IS_GEN9(dev_priv)) {
 		return GUC_CORE_FAMILY_GEN9;
-
-	default:
-		MISSING_CASE(gen);
+	} else {
+		MISSING_CASE(INTEL_GEN(dev_priv));
 		return GUC_CORE_FAMILY_UNKNOWN;
 	}
 }