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

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

 



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@xxxxxxxxx>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@xxxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>

<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@xxxxxxxxxxxxxxx>

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

<SNIP>
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
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