]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm: ffa: fix build with clang
authorStewart Hildebrand <stewart.hildebrand@amd.com>
Thu, 9 Jan 2025 16:33:14 +0000 (17:33 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 9 Jan 2025 16:33:14 +0000 (17:33 +0100)
Clang 16 reports:

In file included from arch/arm/tee/ffa.c:72:
arch/arm/tee/ffa_private.h:329:17: error: 'used' attribute ignored on a non-definition declaration [-Werror,-Wignored-attributes]
extern uint32_t __ro_after_init ffa_fw_version;
                ^

The variable ffa_fw_version is only used in ffa.c. Remove the
declaration in the header and make the definition in ffa.c static.

Fixes: 2f9f240a5e87 ("xen/arm: ffa: Fine granular call support")
Signed-off-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
xen/arch/arm/tee/ffa.c
xen/arch/arm/tee/ffa_private.h

index 87775ed88ffd110b6cdf725e2ffd6a7923331449..3bbdd7168a6bb30af20158899bd5dcc931e682a4 100644 (file)
@@ -72,7 +72,7 @@
 #include "ffa_private.h"
 
 /* Negotiated FF-A version to use with the SPMC, 0 if not there or supported */
-uint32_t __ro_after_init ffa_fw_version;
+static uint32_t __ro_after_init ffa_fw_version;
 
 /* Features supported by the SPMC or secure world when present */
 DECLARE_BITMAP(ffa_fw_abi_supported, FFA_ABI_BITMAP_SIZE);
index d441c0ca55987ad3b4563d36bc9984605783b444..c4cd6553890823f6160a109c234a4f9dff736c65 100644 (file)
@@ -326,7 +326,6 @@ extern void *ffa_rx;
 extern void *ffa_tx;
 extern spinlock_t ffa_rx_buffer_lock;
 extern spinlock_t ffa_tx_buffer_lock;
-extern uint32_t __ro_after_init ffa_fw_version;
 extern DECLARE_BITMAP(ffa_fw_abi_supported, FFA_ABI_BITMAP_SIZE);
 
 bool ffa_shm_domain_destroy(struct domain *d);