From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>
Subject: [PATCH] drm/i915/uc: Drop use of MISSING_CASE on trivial enums
Date: Fri, 31 Mar 2017 10:26:52 +0000 [thread overview]
Message-ID: <20170331102652.177664-1-michal.wajdeczko@intel.com> (raw)
We can rely on compiler to notify us if we miss any case.
This approach may also reduce driver size (reported ~4K).
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
drivers/gpu/drm/i915/intel_uc.h | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h
index d2dcde7..4b7f73a 100644
--- a/drivers/gpu/drm/i915/intel_uc.h
+++ b/drivers/gpu/drm/i915/intel_uc.h
@@ -114,10 +114,8 @@ const char *intel_uc_fw_status_repr(enum intel_uc_fw_status status)
return "PENDING";
case INTEL_UC_FIRMWARE_SUCCESS:
return "SUCCESS";
- default:
- MISSING_CASE(status);
- return "<invalid>";
}
+ return "<invalid>";
}
enum intel_uc_fw_type {
@@ -133,10 +131,8 @@ static inline const char *intel_uc_fw_type_repr(enum intel_uc_fw_type type)
return "GuC";
case INTEL_UC_FW_TYPE_HUC:
return "HuC";
- default:
- MISSING_CASE(type);
- return "<invalid>";
}
+ return "uC";
}
/*
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2017-03-31 10:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 10:26 Michal Wajdeczko [this message]
2017-03-31 12:41 ` ✓ Fi.CI.BAT: success for drm/i915/uc: Drop use of MISSING_CASE on trivial enums Patchwork
2017-03-31 20:12 ` Chris Wilson
2017-03-31 13:42 ` [PATCH] " Chris Wilson
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=20170331102652.177664-1-michal.wajdeczko@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@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.