Clang 22.x.x or Arm Toolchain for Embedded 22.x.x reports:
In file included from arch/arm/tee/ffa.c:75:
arch/arm/tee/ffa_private.h:439:17: error: 'used' attribute ignored on a non-definition declaration [-Werror,-Wignored-attributes]
439 | extern uint32_t __ro_after_init ffa_fw_version;
| ^
There is a fix for clang 16 in the git history:
a1a1e2b7dc4f ("xen/arm: ffa: fix build with clang")
which was broken by the following commit:
a90376c6adbc ("xen/arm: ffa: Add FF-A 1.2 endpoint memory access descriptors")
Remove __ro_after_init from the extern declaration of ffa_fw_version.
The attribute is already present on the definition in ffa.c, which is
sufficient and correct.
Fixes: a90376c6adbc ("xen/arm: ffa: Add FF-A 1.2 endpoint memory access descriptors")
Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
---
Test CI pipeline:
https://gitlab.com/xen-project/people/dimaprkp4k/xen/-/pipelines/2467446333
---
xen/arch/arm/tee/ffa_private.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/arm/tee/ffa_private.h b/xen/arch/arm/tee/ffa_private.h
index c291f32b56..e16bc0d83d 100644
--- a/xen/arch/arm/tee/ffa_private.h
+++ b/xen/arch/arm/tee/ffa_private.h
@@ -436,7 +436,7 @@ struct ffa_ctx {
};
extern DECLARE_BITMAP(ffa_fw_abi_supported, FFA_ABI_BITMAP_SIZE);
-extern uint32_t __ro_after_init ffa_fw_version;
+extern uint32_t ffa_fw_version;
extern struct list_head ffa_ctx_head;
extern rwlock_t ffa_ctx_list_rwlock;
--
2.43.0
Hi Dmytro,
> On 21 Apr 2026, at 10:13, Dmytro Prokopchuk1 <dmytro_prokopchuk1@epam.com> wrote:
>
> Clang 22.x.x or Arm Toolchain for Embedded 22.x.x reports:
>
> In file included from arch/arm/tee/ffa.c:75:
> arch/arm/tee/ffa_private.h:439:17: error: 'used' attribute ignored on a non-definition declaration [-Werror,-Wignored-attributes]
> 439 | extern uint32_t __ro_after_init ffa_fw_version;
> | ^
>
> There is a fix for clang 16 in the git history:
> a1a1e2b7dc4f ("xen/arm: ffa: fix build with clang")
> which was broken by the following commit:
> a90376c6adbc ("xen/arm: ffa: Add FF-A 1.2 endpoint memory access descriptors")
>
> Remove __ro_after_init from the extern declaration of ffa_fw_version.
> The attribute is already present on the definition in ffa.c, which is
> sufficient and correct.
>
> Fixes: a90376c6adbc ("xen/arm: ffa: Add FF-A 1.2 endpoint memory access descriptors")
> Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
Sounds right to me:
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Cheers
Bertrand
> ---
> Test CI pipeline:
> https://gitlab.com/xen-project/people/dimaprkp4k/xen/-/pipelines/2467446333
> ---
> xen/arch/arm/tee/ffa_private.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/tee/ffa_private.h b/xen/arch/arm/tee/ffa_private.h
> index c291f32b56..e16bc0d83d 100644
> --- a/xen/arch/arm/tee/ffa_private.h
> +++ b/xen/arch/arm/tee/ffa_private.h
> @@ -436,7 +436,7 @@ struct ffa_ctx {
> };
>
> extern DECLARE_BITMAP(ffa_fw_abi_supported, FFA_ABI_BITMAP_SIZE);
> -extern uint32_t __ro_after_init ffa_fw_version;
> +extern uint32_t ffa_fw_version;
>
> extern struct list_head ffa_ctx_head;
> extern rwlock_t ffa_ctx_list_rwlock;
> --
> 2.43.0
© 2016 - 2026 Red Hat, Inc.