On ma, 2017-03-27 at 17:19 +0000, Michal Wajdeczko wrote:
> The file fits better. Also use "<invalid>" for invalid case.
> 
> Signed-off-by: Michal Wajdeczko <[email protected]>
> Cc: Arkadiusz Hiler <[email protected]>
> Cc: Joonas Lahtinen <[email protected]>

<SNIP>

> @@ -26,6 +26,24 @@
>  #include "intel_uc.h"
>  #include <linux/firmware.h>
>  
> +
> +/* User-friendly representation of an enum */
> +const char *intel_uc_fw_status_repr(enum intel_uc_fw_status status)

This could be static inline in the .h too.

> +{
> +     switch (status) {
> +     case INTEL_UC_FIRMWARE_FAIL:
> +             return "FAIL";
> +     case INTEL_UC_FIRMWARE_NONE:
> +             return "NONE";
> +     case INTEL_UC_FIRMWARE_PENDING:
> +             return "PENDING";
> +     case INTEL_UC_FIRMWARE_SUCCESS:
> +             return "SUCCESS";
> +     default:

Add MISSING_CASE(status); here.

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

With the MISSING_CASE, this is;

Reviewed-by: Joonas Lahtinen <[email protected]>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to