[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fwts-devel
Subject:    ACK: [PATCH] bios: pnp move pnp_control_field into pnp_test1 and add constifications
From:       ivanhu <ivan.hu () canonical ! com>
Date:       2021-04-21 7:16:34
Message-ID: 730af39b-cb6f-8c59-76ab-e84068d233e7 () canonical ! com
[Download RAW message or body]



On 4/12/21 5:39 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The scope of array pnp_control_field is limited to just function pnp_test1
> so move it into the function. Also add some constifications to read-only
> objects.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/bios/pnp/pnp.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/src/bios/pnp/pnp.c b/src/bios/pnp/pnp.c
> index 870cab6e..42865473 100644
> --- a/src/bios/pnp/pnp.c
> +++ b/src/bios/pnp/pnp.c
> @@ -50,14 +50,7 @@ typedef struct {
>  	uint32_t	PM_data_addr;
>  }  __attribute__ ((packed)) pnp_header;
>  
> -static char *pnp_control_field[] = {
> -	"Not supported",
> -	"Handled by polling",
> -	"Asynchronous",
> -	"Invalid"
> -};
> -
> -static char *oem_device_id(uint32_t id)
> +static char *oem_device_id(const uint32_t id)
>  {
>  	static char buf[12];
>  
> @@ -80,6 +73,13 @@ static int pnp_test1(fwts_framework *fw)
>  	int i;
>  	int found = 0;
>  
> +	static const char *pnp_control_field[] = {
> +		"Not supported",
> +		"Handled by polling",
> +		"Asynchronous",
> +		"Invalid"
> +	};
> +
>  	fwts_log_info(fw,
>  		"This test tries to find and sanity check the "
>  		"Plug and Play BIOS Support Installation Check structure.");
> 


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

-- 
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic