qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 1/7] tests/libqos: Add io_fw_cfg_uninit() and


From: Laszlo Ersek
Subject: Re: [Qemu-devel] [PATCH v3 1/7] tests/libqos: Add io_fw_cfg_uninit() and mm_fw_cfg_uninit()
Date: Tue, 21 May 2019 09:16:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 05/20/19 23:36, Philippe Mathieu-Daudé wrote:
> The mm_fw_cfg_init() allocates a QFWCFG object,
> add mm_fw_cfg_uninit() to deallocate it.
> Similarly with io_fw_cfg_init(), add io_fw_cfg_uninit().
> 
> Signed-off-by: Li Qiang <address@hidden>
> Tested-by: Thomas Huth <address@hidden>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> Tested-by: Philippe Mathieu-Daudé <address@hidden>
> Message-Id: <address@hidden>
> [PMD: Split patch, filled commit description]
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
>  tests/libqos/fw_cfg.c | 10 ++++++++++
>  tests/libqos/fw_cfg.h |  2 ++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/tests/libqos/fw_cfg.c b/tests/libqos/fw_cfg.c
> index d0889d1e22a..c6839c53c80 100644
> --- a/tests/libqos/fw_cfg.c
> +++ b/tests/libqos/fw_cfg.c
> @@ -81,6 +81,11 @@ QFWCFG *mm_fw_cfg_init(QTestState *qts, uint64_t base)
>      return fw_cfg;
>  }
>  
> +void mm_fw_cfg_uninit(QFWCFG *fw_cfg)
> +{
> +    g_free(fw_cfg);
> +}
> +
>  static void io_fw_cfg_select(QFWCFG *fw_cfg, uint16_t key)
>  {
>      qtest_outw(fw_cfg->qts, fw_cfg->base, key);
> @@ -107,3 +112,8 @@ QFWCFG *io_fw_cfg_init(QTestState *qts, uint16_t base)
>  
>      return fw_cfg;
>  }
> +
> +void io_fw_cfg_uninit(QFWCFG *fw_cfg)
> +{
> +    g_free(fw_cfg);
> +}
> diff --git a/tests/libqos/fw_cfg.h b/tests/libqos/fw_cfg.h
> index 0353416af07..391669031a3 100644
> --- a/tests/libqos/fw_cfg.h
> +++ b/tests/libqos/fw_cfg.h
> @@ -33,7 +33,9 @@ uint32_t qfw_cfg_get_u32(QFWCFG *fw_cfg, uint16_t key);
>  uint64_t qfw_cfg_get_u64(QFWCFG *fw_cfg, uint16_t key);
>  
>  QFWCFG *mm_fw_cfg_init(QTestState *qts, uint64_t base);
> +void mm_fw_cfg_uninit(QFWCFG *fw_cfg);
>  QFWCFG *io_fw_cfg_init(QTestState *qts, uint16_t base);
> +void io_fw_cfg_uninit(QFWCFG *fw_cfg);
>  
>  static inline QFWCFG *pc_fw_cfg_init(QTestState *qts)
>  {
> 

Reviewed-by: Laszlo Ersek <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]