Re: [PATCH] drm/i915/guc: fix compile issue of guc_klvs_abi.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 25 Aug 2023, Linyu Yuan <quic_linyyuan@xxxxxxxxxxx> 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@xxxxxxxxxxx>
> ---
>  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



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux