[Intel-gfx] [PATCH] drm/i915/uc: Drop use of MISSING_CASE on trivial enums
Michal Wajdeczko
michal.wajdeczko at intel.com
Fri Mar 31 10:26:52 UTC 2017
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 at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula at intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
---
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
More information about the Intel-gfx
mailing list