Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Linyu Yuan <quic_linyyuan@quicinc.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, Linyu Yuan <quic_linyyuan@quicinc.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc: fix compile issue of guc_klvs_abi.h
Date: Fri, 25 Aug 2023 08:37:43 +0300	[thread overview]
Message-ID: <875y534r88.fsf@intel.com> (raw)
In-Reply-To: <20230825050029.1122-1-quic_linyyuan@quicinc.com>

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

  reply	other threads:[~2023-08-25  5:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25  5:00 [Intel-gfx] [PATCH] drm/i915/guc: fix compile issue of guc_klvs_abi.h Linyu Yuan
2023-08-25  5:37 ` Jani Nikula [this message]
2023-08-25  5:50   ` Linyu Yuan
2023-08-28 21:42     ` Michal Wajdeczko
2023-08-30  2:01       ` Linyu Yuan
2023-08-30  2:05       ` Linyu Yuan
2023-08-28 13:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
2023-08-28 13:53 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-28 15:49 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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=875y534r88.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=quic_linyyuan@quicinc.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=tvrtko.ursulin@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox