ACK: [PATCH] bios: pnp move pnp_control_field into pnp_test1 and add constifications
ivanhu
ivan.hu at canonical.com
Wed Apr 21 07:16:34 UTC 2021
On 4/12/21 5:39 PM, Colin King wrote:
> From: Colin Ian King <colin.king at 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 at 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 at canonical.com>
More information about the fwts-devel
mailing list