diff mbox

[1/3] uefi: remove the enum of reset type

Message ID 1468221578-11018-1-git-send-email-ivan.hu@canonical.com
State Accepted
Headers show

Commit Message

Ivan Hu July 11, 2016, 7:19 a.m. UTC
remove the enum value of reset type on in-kernel efi_runtime header. Let the
user space, fwts_efi_runtime.h, to take care of the enum value which followed
the UEFI spec.

In-kenel driver followed the efi_query_capsule_caps_t defined on efi.h
typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **capsules,
					      unsigned long count,
					      u64 *max_size,
					      int *reset_type);

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 efi_runtime/efi_runtime.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

Colin Ian King July 11, 2016, 7:47 a.m. UTC | #1
On 11/07/16 08:19, Ivan Hu wrote:
> remove the enum value of reset type on in-kernel efi_runtime header. Let the
> user space, fwts_efi_runtime.h, to take care of the enum value which followed
> the UEFI spec.
> 
> In-kenel driver followed the efi_query_capsule_caps_t defined on efi.h
> typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **capsules,
> 					      unsigned long count,
> 					      u64 *max_size,
> 					      int *reset_type);
> 
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  efi_runtime/efi_runtime.h | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/efi_runtime/efi_runtime.h b/efi_runtime/efi_runtime.h
> index ce3c6fe..628bb0c 100644
> --- a/efi_runtime/efi_runtime.h
> +++ b/efi_runtime/efi_runtime.h
> @@ -23,13 +23,6 @@
>  
>  #include <linux/efi.h>
>  
> -typedef enum {
> -	EfiResetCold,
> -	EfiResetWarm,
> -	EfiResetShutdown,
> -	EfiResetPlatformSpecific
> -} EFI_RESET_TYPE;
> -
>  struct efi_getvariable {
>  	uint16_t	*VariableName;
>  	efi_guid_t	*VendorGuid;
> @@ -96,7 +89,7 @@ struct efi_querycapsulecapabilities {
>  	efi_capsule_header_t	**CapsuleHeaderArray;
>  	uint64_t		CapsuleCount;
>  	uint64_t		*MaximumCapsuleSize;
> -	EFI_RESET_TYPE		*ResetType;
> +	int			*ResetType;
>  	uint64_t		*status;
>  } __attribute__ ((packed));
>  
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
Alex Hung July 13, 2016, 2:55 a.m. UTC | #2
On 2016-07-11 03:19 PM, Ivan Hu wrote:
> remove the enum value of reset type on in-kernel efi_runtime header. Let the
> user space, fwts_efi_runtime.h, to take care of the enum value which followed
> the UEFI spec.
>
> In-kenel driver followed the efi_query_capsule_caps_t defined on efi.h
> typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **capsules,
> 					      unsigned long count,
> 					      u64 *max_size,
> 					      int *reset_type);
>
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>   efi_runtime/efi_runtime.h | 9 +--------
>   1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/efi_runtime/efi_runtime.h b/efi_runtime/efi_runtime.h
> index ce3c6fe..628bb0c 100644
> --- a/efi_runtime/efi_runtime.h
> +++ b/efi_runtime/efi_runtime.h
> @@ -23,13 +23,6 @@
>
>   #include <linux/efi.h>
>
> -typedef enum {
> -	EfiResetCold,
> -	EfiResetWarm,
> -	EfiResetShutdown,
> -	EfiResetPlatformSpecific
> -} EFI_RESET_TYPE;
> -
>   struct efi_getvariable {
>   	uint16_t	*VariableName;
>   	efi_guid_t	*VendorGuid;
> @@ -96,7 +89,7 @@ struct efi_querycapsulecapabilities {
>   	efi_capsule_header_t	**CapsuleHeaderArray;
>   	uint64_t		CapsuleCount;
>   	uint64_t		*MaximumCapsuleSize;
> -	EFI_RESET_TYPE		*ResetType;
> +	int			*ResetType;
>   	uint64_t		*status;
>   } __attribute__ ((packed));
>
>

Acked-by: Alex Hung <alex.hung@canonical.com>
diff mbox

Patch

diff --git a/efi_runtime/efi_runtime.h b/efi_runtime/efi_runtime.h
index ce3c6fe..628bb0c 100644
--- a/efi_runtime/efi_runtime.h
+++ b/efi_runtime/efi_runtime.h
@@ -23,13 +23,6 @@ 
 
 #include <linux/efi.h>
 
-typedef enum {
-	EfiResetCold,
-	EfiResetWarm,
-	EfiResetShutdown,
-	EfiResetPlatformSpecific
-} EFI_RESET_TYPE;
-
 struct efi_getvariable {
 	uint16_t	*VariableName;
 	efi_guid_t	*VendorGuid;
@@ -96,7 +89,7 @@  struct efi_querycapsulecapabilities {
 	efi_capsule_header_t	**CapsuleHeaderArray;
 	uint64_t		CapsuleCount;
 	uint64_t		*MaximumCapsuleSize;
-	EFI_RESET_TYPE		*ResetType;
+	int			*ResetType;
 	uint64_t		*status;
 } __attribute__ ((packed));