[Intel-xe] [PATCH v4 1/6] drm/xe: Add XE_MISSING_CASE macro
Ghimiray, Himal Prasad
himal.prasad.ghimiray at intel.com
Wed Sep 20 13:46:04 UTC 2023
On 04-09-2023 23:52, Badal Nilawar wrote:
> Add XE_MISSING_CASE macro to handle missing switch case
>
> Cc: Andi Shyti<andi.shyti at linux.intel.com>
> Signed-off-by: Badal Nilawar<badal.nilawar at intel.com>
> ---
> drivers/gpu/drm/xe/xe_macros.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_macros.h b/drivers/gpu/drm/xe/xe_macros.h
> index daf56c846d03..21ba859d5f80 100644
> --- a/drivers/gpu/drm/xe/xe_macros.h
> +++ b/drivers/gpu/drm/xe/xe_macros.h
> @@ -15,4 +15,7 @@
> "Ioctl argument check failed at %s:%d: %s", \
> __FILE__, __LINE__, #cond), 1))
>
> +#define XE_MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
> + __stringify(x), (long)(x))
Please add a comment to ensure, the parameter to macro should be a
variable name.
with the above addressed:
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
<mailto:himal.prasad.ghimiray at intel.com>
> +
> #endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-xe/attachments/20230920/4a3ac3b5/attachment-0001.htm>
More information about the Intel-xe
mailing list