* [PATCH] ARM: layerscape: ppa: fix type of C variable used in inline assembly
@ 2024-01-08 9:59 Ahmad Fatoum
2024-01-10 6:46 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-01-08 9:59 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
clang warns that cr should be an unsigned long as it's used to
initialize a register argument for the mrs instruction.
Change the type from unsigned int to unsigned long to fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/arm/mach-layerscape/ppa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-layerscape/ppa.c b/arch/arm/mach-layerscape/ppa.c
index 37d467386f6f..1f69aacf083a 100644
--- a/arch/arm/mach-layerscape/ppa.c
+++ b/arch/arm/mach-layerscape/ppa.c
@@ -124,7 +124,7 @@ int ls1046a_ppa_init(resource_size_t ppa_start, resource_size_t ppa_size)
get_builtin_firmware(ppa_ls1046a_bin, &ppa_fw, &ppa_fw_size);
if (el == 3) {
- unsigned int cr;
+ unsigned long cr;
asm volatile("mrs %0, sctlr_el3" : "=r" (cr) : : "cc");
remap_range((void *)ppa_start, ppa_size, MAP_CACHED);
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: layerscape: ppa: fix type of C variable used in inline assembly
2024-01-08 9:59 [PATCH] ARM: layerscape: ppa: fix type of C variable used in inline assembly Ahmad Fatoum
@ 2024-01-10 6:46 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-01-10 6:46 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Mon, Jan 08, 2024 at 10:59:59AM +0100, Ahmad Fatoum wrote:
> clang warns that cr should be an unsigned long as it's used to
> initialize a register argument for the mrs instruction.
>
> Change the type from unsigned int to unsigned long to fix this.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> arch/arm/mach-layerscape/ppa.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/mach-layerscape/ppa.c b/arch/arm/mach-layerscape/ppa.c
> index 37d467386f6f..1f69aacf083a 100644
> --- a/arch/arm/mach-layerscape/ppa.c
> +++ b/arch/arm/mach-layerscape/ppa.c
> @@ -124,7 +124,7 @@ int ls1046a_ppa_init(resource_size_t ppa_start, resource_size_t ppa_size)
> get_builtin_firmware(ppa_ls1046a_bin, &ppa_fw, &ppa_fw_size);
>
> if (el == 3) {
> - unsigned int cr;
> + unsigned long cr;
>
> asm volatile("mrs %0, sctlr_el3" : "=r" (cr) : : "cc");
> remap_range((void *)ppa_start, ppa_size, MAP_CACHED);
> --
> 2.39.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-10 6:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-08 9:59 [PATCH] ARM: layerscape: ppa: fix type of C variable used in inline assembly Ahmad Fatoum
2024-01-10 6:46 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox