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

[PATCH v2] xen/arm: ffa: fix build with clang


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Wed, 8 Jan 2025 11:40:53 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1J462nUP7/zF0Y8aeTwKy9th83yPn5qJrCNSuQK7Kv8=; b=wfPN4x5FvzBKi4mY22uYn2pi4+mqDT1oudNSPrE1mEnH5iHgHO3lHTFd8HGMvmC9yO6Tjr/7odOZ3aQmb7l0MjLz028q4u6NVjRwj2Ow/C203kgvR5F7KNpOFtemH7vgIxFsx3gVpGzLNdiHejPrB6vDxZC9Oi4ymt+5tNVv2Fmc0Wc4T2am8MxzRIXTI+BMFIDYpfquxRa7U66b4m5tMmE35I5DiBFeYDLq/kxZGgOg42v3NEt8u7QUbY3C3aHf0Lzmqykhdgz/r7KpApxKYy5jK1SfPpmZk+tbPKc75yzIwbf+kwZia4iJo6OAdalpf99NMgNczmS9/1iqayxbIw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wXrOTdmLQc21PbKADIEOxf7iPEvttXhKbebtqzy5df4ue6TrQSpSLLOHcK06+rKXT7SDFQ4DVQkAlPu0e7Ycvag+cprbSaYNZhwTJ2IbhTfK0B7a+LSOcVsnty6KVjuW7isHf/BEZ14uQzYXncyBs3+FswdeI81Ja/w+7pQyDLeGw+TPmVI8DwuuVexCh8SvrI4MtWNt0eyIuss9y92h0CGRuYkNqm1RZ0490bPW5gJ4piC5dGmqstDq7KkHuNOBBYSu4PYfbDdMedMe1KoxPuyF7LMp0/iJrMAwfB/vIcY8iKfgNoMmliAufuYer1OsaagSnYjUqkVEecqSdrhKTQ==
  • Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • Delivery-date: Wed, 08 Jan 2025 16:41:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxx>
---
v1->v2:
* remove declaration and make definition static
---
 xen/arch/arm/tee/ffa.c         | 2 +-
 xen/arch/arm/tee/ffa_private.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c
index 87775ed88ffd..3bbdd7168a6b 100644
--- a/xen/arch/arm/tee/ffa.c
+++ b/xen/arch/arm/tee/ffa.c
@@ -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);
diff --git a/xen/arch/arm/tee/ffa_private.h b/xen/arch/arm/tee/ffa_private.h
index d441c0ca5598..c4cd65538908 100644
--- a/xen/arch/arm/tee/ffa_private.h
+++ b/xen/arch/arm/tee/ffa_private.h
@@ -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);

base-commit: 70f5a875becc9444a959830b10a361982c31a366
-- 
2.47.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.