ACK: [PATCH] acpi_object_names: move array acpi_object_names into fwts_method_check_element_type

ivanhu ivan.hu at canonical.com
Mon Apr 12 07:27:03 UTC 2021



On 4/11/21 8:59 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> The scope of acpi_object_names is in fwts_method_check_element_type so
> move into into the function.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/lib/src/fwts_acpi_object_eval.c | 64 ++++++++++++++---------------
>  1 file changed, 32 insertions(+), 32 deletions(-)
> 
> diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c
> index 36b92734..df80b635 100644
> --- a/src/lib/src/fwts_acpi_object_eval.c
> +++ b/src/lib/src/fwts_acpi_object_eval.c
> @@ -509,38 +509,6 @@ static void get_object_name(const char *name, char* obj_name) {
>  	}
>  }
>  
> -/* See references in actypes.h */
> -static const char *acpi_object_names[] = {
> -	"Any",
> -	"Integer",
> -	"String",
> -	"Buffer",
> -	"Package",
> -	"Field Unit",
> -	"Device",
> -	"Event",
> -	"Method",
> -	"Mutex",
> -	"Region",
> -	"Power",
> -	"Processor",
> -	"Thermal",
> -	"Buffer Field",
> -	"DDB Handle",
> -	"Debug Object",
> -	"Region Field",
> -	"Bank Field",
> -	"Index Field",
> -	"Reference",
> -	"Alias",
> -	"Method Alias",
> -	"Notify",
> -	"Address Handler",
> -	"Resource",
> -	"Resource Field",
> -	"Scope"
> -};
> -
>  /*
>   *  fwts_method_check_element_type()
>   *	check a element type of a sub-package
> @@ -553,6 +521,38 @@ int fwts_method_check_element_type(
>  	const uint32_t element,
>  	const ACPI_OBJECT_TYPE type)
>  {
> +	/* See references in actypes.h */
> +	static const char *acpi_object_names[] = {
> +		"Any",
> +		"Integer",
> +		"String",
> +		"Buffer",
> +		"Package",
> +		"Field Unit",
> +		"Device",
> +		"Event",
> +		"Method",
> +		"Mutex",
> +		"Region",
> +		"Power",
> +		"Processor",
> +		"Thermal",
> +		"Buffer Field",
> +		"DDB Handle",
> +		"Debug Object",
> +		"Region Field",
> +		"Bank Field",
> +		"Index Field",
> +		"Reference",
> +		"Alias",
> +		"Method Alias",
> +		"Notify",
> +		"Address Handler",
> +		"Resource",
> +		"Resource Field",
> +		"Scope"
> +	};
> +
>  	if (obj->Package.Elements[element].Type != type) {
>  		char obj_name[5] = "_XYZ";
>  		char tmp[128];
> 

Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list