[PATCH] drm/i915/uc: Drop use of MISSING_CASE on trivial enums

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We can rely on compiler to notify us if we miss any case.
This approach may also reduce driver size (reported ~4K).

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_uc.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h
index d2dcde7..4b7f73a 100644
--- a/drivers/gpu/drm/i915/intel_uc.h
+++ b/drivers/gpu/drm/i915/intel_uc.h
@@ -114,10 +114,8 @@ const char *intel_uc_fw_status_repr(enum intel_uc_fw_status status)
 		return "PENDING";
 	case INTEL_UC_FIRMWARE_SUCCESS:
 		return "SUCCESS";
-	default:
-		MISSING_CASE(status);
-		return "<invalid>";
 	}
+	return "<invalid>";
 }
 
 enum intel_uc_fw_type {
@@ -133,10 +131,8 @@ static inline const char *intel_uc_fw_type_repr(enum intel_uc_fw_type type)
 		return "GuC";
 	case INTEL_UC_FW_TYPE_HUC:
 		return "HuC";
-	default:
-		MISSING_CASE(type);
-		return "<invalid>";
 	}
+	return "uC";
 }
 
 /*
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux