1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-04-20 23:41:08 +00:00

arm-bsp/u-boot: corstone1000: arm_ffa: removing the cast when using binary OR on FIELD_PREP macros

When the GENMASK used is above 16-bits wide a u16 cast will cause
loss of data.

This commit fixes that.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Change-Id: I72e5e42971a50ce167500a92cc529c5cb3ff781f
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Abdellatif El Khlifi
2021-12-13 13:22:26 +00:00
committed by Jon Mason
parent 7664222af7
commit 3c30cb6f06
2 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
Upstream-Status: Pending [Not submitted to upstream yet]
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
From 8907d857321de362ee545d3c86e39e9b49380c70 Mon Sep 17 00:00:00 2001
From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Date: Sat, 11 Dec 2021 21:05:10 +0000
Subject: [PATCH] arm_ffa: removing the cast when using binary OR on FIELD_PREP
macros
When the GENMASK used is above 16-bits wide a u16 cast will cause
loss of data.
This commit fixes that.
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
---
drivers/arm-ffa/arm_ffa_prv.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/arm-ffa/arm_ffa_prv.h b/drivers/arm-ffa/arm_ffa_prv.h
index 38ea4ba83e..d0db3ef508 100644
--- a/drivers/arm-ffa/arm_ffa_prv.h
+++ b/drivers/arm-ffa/arm_ffa_prv.h
@@ -40,13 +40,13 @@
#define PREP_SELF_ENDPOINT_ID_MASK GENMASK(31, 16)
#define PREP_SELF_ENDPOINT_ID(x) \
- ((u16)(FIELD_PREP(PREP_SELF_ENDPOINT_ID_MASK, (x))))
+ (FIELD_PREP(PREP_SELF_ENDPOINT_ID_MASK, (x)))
/* Partition endpoint ID mask (partition with which u-boot communicates with) */
#define PREP_PART_ENDPOINT_ID_MASK GENMASK(15, 0)
#define PREP_PART_ENDPOINT_ID(x) \
- ((u16)(FIELD_PREP(PREP_PART_ENDPOINT_ID_MASK, (x))))
+ (FIELD_PREP(PREP_PART_ENDPOINT_ID_MASK, (x)))
/* The FF-A SMC function prototype definition */
--
2.17.1

View File

@@ -48,6 +48,7 @@ SRC_URI:append:corstone1000 = " \
file://0036-efi_capsule-corstone1000-pass-interface-and-buffer-event-ids-in-w4.patch \
file://0037-efi_boottime-corstone1000-pass-interface-and-kernel-event-ids-in-w4.patch \
file://0038-efi_loader-remove-guid-check-from-corstone1000-confi.patch \
file://0039-arm_ffa-removing-the-cast-when-using-binary-OR-on-FIELD_PREP.patch \
"
#