From c2eaf26a4a559bca4dc5110a4d05be8f961ce0c2 Mon Sep 17 00:00:00 2001 From: Ledion Daja Date: Tue, 3 Oct 2023 17:33:28 +0200 Subject: 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 --- kernel/uapi/ethosu.h | 4 ++-- 1 file 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 -- cgit v1.2.1