Skip to content

Commit

Permalink
drm/i915/uc: Drop use of MISSING_CASE on trivial enums
Browse files Browse the repository at this point in the history
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@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170331102652.177664-1-michal.wajdeczko@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Michal Wajdeczko authored and Chris Wilson committed Mar 31, 2017
1 parent d7c530b commit b9ab1f3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/gpu/drm/i915/intel_uc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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";
}

/*
Expand Down

0 comments on commit b9ab1f3

Please sign in to comment.