From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/5] drm/i915/uc: Move intel_uc_fw_status_repr() to intel_uc.c
Date: Tue, 28 Mar 2017 10:05:31 +0300 [thread overview]
Message-ID: <1490684731.3007.2.camel@linux.intel.com> (raw)
In-Reply-To: <20170327171929.122384-1-michal.wajdeczko@intel.com>
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 <michal.wajdeczko@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
<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 <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-03-28 7:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-27 17:19 [PATCH 1/5] drm/i915/uc: Move intel_uc_fw_status_repr() to intel_uc.c Michal Wajdeczko
2017-03-28 7:05 ` Joonas Lahtinen [this message]
2017-03-28 8:27 ` Michal Wajdeczko
2017-03-28 12:51 ` Michal Wajdeczko
2017-03-28 16:21 ` Srivatsa, Anusha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490684731.3007.2.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=michal.wajdeczko@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.