[Intel-gfx] [PATCH] drm/i915/guc: fix compile issue of guc_klvs_abi.h
Jani Nikula
jani.nikula at linux.intel.com
Fri Aug 25 05:37:43 UTC 2023
On Fri, 25 Aug 2023, Linyu Yuan <quic_linyyuan at quicinc.com> wrote:
> GCC report GUC_KLV_0_KEY and GUC_KLV_0_LEN is not constant when do
> preprocessing.
Please paste the actual compiler warning.
BR,
Jani.
>
> Change to use GENMASK() to avoid the issue.
>
> Signed-off-by: Linyu Yuan <quic_linyyuan at quicinc.com>
> ---
> drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h b/drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h
> index 58012edd4eb0..fd3c16695e5f 100644
> --- a/drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h
> +++ b/drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h
> @@ -29,8 +29,8 @@
> */
>
> #define GUC_KLV_LEN_MIN 1u
> -#define GUC_KLV_0_KEY (0xffff << 16)
> -#define GUC_KLV_0_LEN (0xffff << 0)
> +#define GUC_KLV_0_KEY GENMASK(31, 16)
> +#define GUC_KLV_0_LEN GENMASK(15, 0)
> #define GUC_KLV_n_VALUE (0xffffffff << 0)
>
> /**
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list