[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/arm: ffa: fix build with clang
- To: Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Wed, 8 Jan 2025 15:36:00 +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=3hD8xIYc6VVS824h8d5KufrDDBbP5el6Akssegh8XgI=; b=dW2Cv5JEQlhK75esnH1QGhx79p0aCoybKlciQLM4gacIX/VASxRhjxcq4Bi5B05ixMVS75Cft8ffVwLzeG/nS+FXSr+30E/IAbZAfq+bCzhQ+p36mZIHUo+TzcAwVTP2vlC3czKguRjMcy323t9XPHveSzb7jA+nb/vx09yCW9N5HqqfuvAKim2lp7jv95u6W76JrQ8TSejaL2J9yuYH/wPIvQ2+3/rnqQP6yb9V2iZ4XTTz1oYg3ycm4o0bhQfXcgSB3Z51pumTYoYk9NQjLi7yOztgV8gxTY/SdiuN/WdF7FzXAcJdd+pyVHthdzn8Q8r8Dj3YwInZPhUmiUK53g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tZqKGN0ugm3z7ag6zXi2Y0uMtApMd+lqgOw/UyGX5Nkgc/AkI1joZ8/jM9Pu20xu1qjeXpzBYwGVMjfRiOUZWrNpQd6KJgaw3KDY6dHzZlDdkUYVqo+rW/B7Xn+S+SbgFCDYbuHRykcxKO6OZaqQc9TrAPdunMzecoO99mSVsUAMLdlxQdkr+FRXTBqCZM51cITFmKMoMmh1qnQQFFmC2I58UCtgsloK3e3ulLknG0voVqhDydKXKiHKHepKTz1KHEJbpX5C1ePNs1HSkk5fK1T+1+sT7v7cdPVeqWmstub61xIo6CczMZDisgDw/tdwlQuQJKvt87ATcsZBoRV2PA==
- 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: Wed, 08 Jan 2025 15:36:15 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHbYeFGu37kkF0Uuk6Sa5TIC8NMALMNAjoA
- Thread-topic: [PATCH] xen/arm: ffa: fix build with clang
Hi Stewart,
Thanks a lot for the finding and the fix :-)
> On 8 Jan 2025, at 16:23, 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;
> ^
>
> Remove the attribute from the header to resolve this. The attribute in
> ffa.c is the one the matters anyway.
>
> 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
> ---
> It appears the variable ffa_fw_version is only used in ffa.c. Was there
> any rationale for exporting the symbol in 2f9f240a5e87 ("xen/arm: ffa:
> Fine granular call support")? If not, perhaps we ought to make it static
> again and remove the declaration in the header.
> ---
> 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 d441c0ca5598..05368d5a88d3 100644
> --- a/xen/arch/arm/tee/ffa_private.h
> +++ b/xen/arch/arm/tee/ffa_private.h
> @@ -326,7 +326,7 @@ 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 uint32_t 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
>
|