diff options
author | Ledion Daja <ledion.daja@arm.com> | 2023-10-03 17:33:28 +0200 |
---|---|---|
committer | Ledion Daja <ledion.daja@arm.com> | 2023-10-10 13:27:42 +0200 |
commit | c2eaf26a4a559bca4dc5110a4d05be8f961ce0c2 (patch) | |
tree | 2d43924a6264a2705e16cc62222bcc0d619f39a8 | |
parent | 00f83c0e552b098976af88c6be43d6f53396cede (diff) | |
download | ethos-u-linux-driver-stack-c2eaf26a4a559bca4dc5110a4d05be8f961ce0c2.tar.gz |
Replace enum with fixed-width int in UAPI structs
In order to avoid struct layout misalignment issues between user and
kernel space, raising from size of enum members being implementation-
defined, the enum members of structs in the UAPI header file have now
been replaced with fixed-width integers.
Change-Id: I44a41c6d6669d116ca239da72676dd0539bf88b9
Signed-off-by: Ledion Daja <ledion.daja@arm.com>
-rw-r--r-- | kernel/uapi/ethosu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/uapi/ethosu.h b/kernel/uapi/ethosu.h index b35cd05..69f8d3a 100644 --- a/kernel/uapi/ethosu.h +++ b/kernel/uapi/ethosu.h @@ -256,7 +256,7 @@ struct ethosu_uapi_inference_create { * ETHOSU_UAPI_STATUS_OK. */ struct ethosu_uapi_result_status { - enum ethosu_uapi_status status; + __u32 status; struct ethosu_uapi_pmu_config pmu_config; struct ethosu_uapi_pmu_counts pmu_count; }; @@ -267,7 +267,7 @@ struct ethosu_uapi_result_status { * @status OK if inference cancellation was performed, ERROR otherwise. */ struct ethosu_uapi_cancel_inference_status { - enum ethosu_uapi_status status; + __u32 status; }; #ifdef __cplusplus |