All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: 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:27:28 +0200	[thread overview]
Message-ID: <20170328082728.GA131976@mwajdecz-MOBL1.ger.corp.intel.com> (raw)
In-Reply-To: <1490684731.3007.2.camel@linux.intel.com>

On Tue, Mar 28, 2017 at 10:05:31AM +0300, Joonas Lahtinen wrote:
> 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.

This will require another patch that will move definition of
MISSING_CASE macro from i915_drv.h to i915_utils.h as intel_uc.h
is included now ahead of MISSING_CASE definition... stay tuned ;)

-Michal

> 
> > +		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

  reply	other threads:[~2017-03-28  8:27 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
2017-03-28  8:27   ` Michal Wajdeczko [this message]
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=20170328082728.GA131976@mwajdecz-MOBL1.ger.corp.intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.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.