From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch>,
David Airlie <airlied@gmail.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc: avoid FIELD_PREP warning
Date: Fri, 17 Feb 2023 11:07:20 -0500 [thread overview]
Message-ID: <Y++mOIxOQFCmchM5@intel.com> (raw)
In-Reply-To: <20230217124724.1324126-1-arnd@kernel.org>
On Fri, Feb 17, 2023 at 01:46:50PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> With gcc-7 and earlier, there are lots of warnings like
>
> In file included from <command-line>:0:0:
> In function '__guc_context_policy_add_priority.isra.66',
> inlined from '__guc_context_set_prio.isra.67' at drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:3292:3,
> inlined from 'guc_context_set_prio' at drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:3320:2:
> include/linux/compiler_types.h:399:38: error: call to '__compiletime_assert_631' declared with attribute error: FIELD_PREP: mask is not constant
> _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> ^
> ...
> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:2422:3: note: in expansion of macro 'FIELD_PREP'
> FIELD_PREP(GUC_KLV_0_KEY, GUC_CONTEXT_POLICIES_KLV_ID_##id) | \
> ^~~~~~~~~~
>
> Make sure that GUC_KLV_0_KEY is an unsigned value to avoid the warning.
>
> Fixes: 77b6f79df66e ("drm/i915/guc: Update to GuC version 69.0.3")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 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..4f4f53c42a9c 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,9 +29,9 @@
> */
>
> #define GUC_KLV_LEN_MIN 1u
> -#define GUC_KLV_0_KEY (0xffff << 16)
> -#define GUC_KLV_0_LEN (0xffff << 0)
> -#define GUC_KLV_n_VALUE (0xffffffff << 0)
> +#define GUC_KLV_0_KEY (0xffffu << 16)
> +#define GUC_KLV_0_LEN (0xffffu << 0)
> +#define GUC_KLV_n_VALUE (0xffffffffu << 0)
what about changing them to GENMASK?
>
> /**
> * DOC: GuC Self Config KLVs
> --
> 2.39.1
>
WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Matthew Brost <matthew.brost@intel.com>,
Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
Arnd Bergmann <arnd@arndb.de>,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
John Harrison <John.C.Harrison@intel.com>,
Michal Wajdeczko <michal.wajdeczko@intel.com>
Subject: Re: [PATCH] drm/i915/guc: avoid FIELD_PREP warning
Date: Fri, 17 Feb 2023 11:07:20 -0500 [thread overview]
Message-ID: <Y++mOIxOQFCmchM5@intel.com> (raw)
In-Reply-To: <20230217124724.1324126-1-arnd@kernel.org>
On Fri, Feb 17, 2023 at 01:46:50PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> With gcc-7 and earlier, there are lots of warnings like
>
> In file included from <command-line>:0:0:
> In function '__guc_context_policy_add_priority.isra.66',
> inlined from '__guc_context_set_prio.isra.67' at drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:3292:3,
> inlined from 'guc_context_set_prio' at drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:3320:2:
> include/linux/compiler_types.h:399:38: error: call to '__compiletime_assert_631' declared with attribute error: FIELD_PREP: mask is not constant
> _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> ^
> ...
> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:2422:3: note: in expansion of macro 'FIELD_PREP'
> FIELD_PREP(GUC_KLV_0_KEY, GUC_CONTEXT_POLICIES_KLV_ID_##id) | \
> ^~~~~~~~~~
>
> Make sure that GUC_KLV_0_KEY is an unsigned value to avoid the warning.
>
> Fixes: 77b6f79df66e ("drm/i915/guc: Update to GuC version 69.0.3")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 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..4f4f53c42a9c 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,9 +29,9 @@
> */
>
> #define GUC_KLV_LEN_MIN 1u
> -#define GUC_KLV_0_KEY (0xffff << 16)
> -#define GUC_KLV_0_LEN (0xffff << 0)
> -#define GUC_KLV_n_VALUE (0xffffffff << 0)
> +#define GUC_KLV_0_KEY (0xffffu << 16)
> +#define GUC_KLV_0_LEN (0xffffu << 0)
> +#define GUC_KLV_n_VALUE (0xffffffffu << 0)
what about changing them to GENMASK?
>
> /**
> * DOC: GuC Self Config KLVs
> --
> 2.39.1
>
WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
David Airlie <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
Matthew Brost <matthew.brost@intel.com>,
"John Harrison" <John.C.Harrison@intel.com>,
Michal Wajdeczko <michal.wajdeczko@intel.com>,
<intel-gfx@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>, Arnd Bergmann <arnd@arndb.de>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/i915/guc: avoid FIELD_PREP warning
Date: Fri, 17 Feb 2023 11:07:20 -0500 [thread overview]
Message-ID: <Y++mOIxOQFCmchM5@intel.com> (raw)
In-Reply-To: <20230217124724.1324126-1-arnd@kernel.org>
On Fri, Feb 17, 2023 at 01:46:50PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> With gcc-7 and earlier, there are lots of warnings like
>
> In file included from <command-line>:0:0:
> In function '__guc_context_policy_add_priority.isra.66',
> inlined from '__guc_context_set_prio.isra.67' at drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:3292:3,
> inlined from 'guc_context_set_prio' at drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:3320:2:
> include/linux/compiler_types.h:399:38: error: call to '__compiletime_assert_631' declared with attribute error: FIELD_PREP: mask is not constant
> _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> ^
> ...
> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:2422:3: note: in expansion of macro 'FIELD_PREP'
> FIELD_PREP(GUC_KLV_0_KEY, GUC_CONTEXT_POLICIES_KLV_ID_##id) | \
> ^~~~~~~~~~
>
> Make sure that GUC_KLV_0_KEY is an unsigned value to avoid the warning.
>
> Fixes: 77b6f79df66e ("drm/i915/guc: Update to GuC version 69.0.3")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 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..4f4f53c42a9c 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,9 +29,9 @@
> */
>
> #define GUC_KLV_LEN_MIN 1u
> -#define GUC_KLV_0_KEY (0xffff << 16)
> -#define GUC_KLV_0_LEN (0xffff << 0)
> -#define GUC_KLV_n_VALUE (0xffffffff << 0)
> +#define GUC_KLV_0_KEY (0xffffu << 16)
> +#define GUC_KLV_0_LEN (0xffffu << 0)
> +#define GUC_KLV_n_VALUE (0xffffffffu << 0)
what about changing them to GENMASK?
>
> /**
> * DOC: GuC Self Config KLVs
> --
> 2.39.1
>
next prev parent reply other threads:[~2023-02-17 16:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 12:46 [Intel-gfx] [PATCH] drm/i915/guc: avoid FIELD_PREP warning Arnd Bergmann
2023-02-17 12:46 ` Arnd Bergmann
2023-02-17 12:46 ` Arnd Bergmann
2023-02-17 13:51 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2023-02-17 15:38 ` [Intel-gfx] [PATCH] " Andrzej Hajda
2023-02-17 15:38 ` Andrzej Hajda
2023-02-17 16:15 ` Arnd Bergmann
2023-02-17 16:15 ` Arnd Bergmann
2023-02-17 15:54 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-02-17 16:07 ` Rodrigo Vivi [this message]
2023-02-17 16:07 ` [PATCH] " Rodrigo Vivi
2023-02-17 16:07 ` Rodrigo Vivi
2023-02-18 1:25 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork
2023-02-20 12:51 ` [Intel-gfx] [PATCH] " Michal Wajdeczko
2023-02-20 12:51 ` Michal Wajdeczko
2023-02-20 12:51 ` Michal Wajdeczko
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=Y++mOIxOQFCmchM5@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=airlied@gmail.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
/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.