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

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


  • To: Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Thu, 9 Jan 2025 07:44:43 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • 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=fH+VKwlzw0iKMVEqVDynbAlT+7oOjEXG0z+zF6p+wA0=; b=ynJMh9EYvpNyQ5OMdM8CpXPdryvRc5n7a75UZdXnVKrhsxh8BuYPBAvIF0DCKBwX3YaZBpbVts45xvV1W/TyiAMZ868iC1wY0W7CaHuK/xRQwG6CdrCA20T4c9RpmY+4tvjFtNz3Gnf+ODk64MHJj14fKMX8NOqC2sqOSxM94XQz2iBwpOkF5LzAoqpsRwlbfUMDqcLnR9unaYeVkZx+9lx7jm3CcUn3nWfqmfoJzChZQxTLgJ+ovArIAwMwcHvZ+v8ljennC2mk73LvSaomEGDqkYr9mMwf5mPt3HbAnamdMSM2/dTSUWIqWuvNHkAZqR9nLvw89tPnY/PxisKH9g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Y8HbgAQunI7+T5mXw1NuM/UqMsWnosqoS5OtL4MNd7Kh8susnS5VfI3sRxRdHjoAgrEYWKqC+qqgDX18yBTmIG54odRTT+vEAdalwY4SmXmPBLf87VtOAcLmpiLkJLzD0KkLuZ/g6z8/omGopocGzZ3WzTShHG2VGDyFcubRrXwk3ci1ukh1VEhdQPTs1UQqHs0JlOI94n0T6AbBytIM3UkhdOXqBM0dlYZUiiWRuMIuZ5adEeVT0qpvn2tceX81Rvp3iR1c4c7eQWP+0q9H6GqR0iZBLXQrtUtWlFFQqCE/1c58smGlTlR7fMLZUW6skWMEZOZ3YyH4YG4blp68SA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • Delivery-date: Thu, 09 Jan 2025 07:45:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHbYewebJ/QvtJc8k6NoHOEpj2W67MOEM2A
  • Thread-topic: [PATCH v2] xen/arm: ffa: fix build with clang

Hi Stewart,

> On 8 Jan 2025, at 17:40, Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx> 
> wrote:
> 
> 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>

Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Cheers
Bertrand

> ---
> 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®.