Re: [PATCH 2/5] drm/i915/uc: Add intel_uc_fw_type_repr()

Joonas Lahtinen
2017-03-28T07:08:01Z

On ma, 2017-03-27 at 17:20 +0000, Michal Wajdeczko wrote:
> Some of the DRM_NOTE messages are just using "uC" without specifying
> which uc they are related to. We can be more user friendly.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

<SNIP>

> @@ -44,6 +44,19 @@ const char *intel_uc_fw_status_repr(enum intel_uc_fw_status status)
>   }
>  }
>
> +/* User-friendly representation of an enum */
> +const char *intel_uc_fw_type_repr(enum intel_uc_fw_type status)

This could too, be in the header.

> +{
> + switch (status) {
> + case INTEL_UC_FW_TYPE_GUC:
> + return "GuC";
> + case INTEL_UC_FW_TYPE_HUC:
> + return "HuC";
> + default:

Add MISSING_CASE(status) and this is;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

> + return "<invalid>";
> + }
> +}

<SNIP>
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org