Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 1 | From 460406b46b51b6c585788001147a8961c95cc73c Mon Sep 17 00:00:00 2001 |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 2 | From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> |
| 3 | Date: Sat, 11 Dec 2021 21:05:10 +0000 |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 4 | Subject: [PATCH 18/24] arm_ffa: removing the cast when using binary OR on |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 5 | FIELD_PREP macros |
| 6 | |
| 7 | When the GENMASK used is above 16-bits wide a u16 cast will cause |
| 8 | loss of data. |
| 9 | |
| 10 | This commit fixes that. |
| 11 | |
| 12 | Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> |
| 13 | Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> |
| 14 | --- |
| 15 | drivers/arm-ffa/arm_ffa_prv.h | 4 ++-- |
| 16 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 17 | |
| 18 | diff --git a/drivers/arm-ffa/arm_ffa_prv.h b/drivers/arm-ffa/arm_ffa_prv.h |
| 19 | index 38ea4ba83efc..d0db3ef508a1 100644 |
| 20 | --- a/drivers/arm-ffa/arm_ffa_prv.h |
| 21 | +++ b/drivers/arm-ffa/arm_ffa_prv.h |
| 22 | @@ -40,13 +40,13 @@ |
| 23 | |
| 24 | #define PREP_SELF_ENDPOINT_ID_MASK GENMASK(31, 16) |
| 25 | #define PREP_SELF_ENDPOINT_ID(x) \ |
| 26 | - ((u16)(FIELD_PREP(PREP_SELF_ENDPOINT_ID_MASK, (x)))) |
| 27 | + (FIELD_PREP(PREP_SELF_ENDPOINT_ID_MASK, (x))) |
| 28 | |
| 29 | /* Partition endpoint ID mask (partition with which u-boot communicates with) */ |
| 30 | |
| 31 | #define PREP_PART_ENDPOINT_ID_MASK GENMASK(15, 0) |
| 32 | #define PREP_PART_ENDPOINT_ID(x) \ |
| 33 | - ((u16)(FIELD_PREP(PREP_PART_ENDPOINT_ID_MASK, (x)))) |
| 34 | + (FIELD_PREP(PREP_PART_ENDPOINT_ID_MASK, (x))) |
| 35 | |
| 36 | /* The FF-A SMC function prototype definition */ |
| 37 | |
| 38 | -- |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 39 | 2.37.1 |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 40 | |