From: Laszlo Ersek <lersek@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-devel@nongnu.org
Cc: Laurent Vivier <lvivier@redhat.com>,
Thomas Huth <thuth@redhat.com>, Li Qiang <liq3ea@gmail.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 2/7] tests/libqos/fw_cfg: Document mm_fw_cfg_init to drop mm_fw_cfg_uninit
Date: Fri, 4 Oct 2019 20:40:47 +0200 [thread overview]
Message-ID: <137fead7-0e93-7d86-dadd-68e0569cdb7b@redhat.com> (raw)
In-Reply-To: <20191003225437.16651-3-philmd@redhat.com>
On 10/04/19 00:54, Philippe Mathieu-Daudé wrote:
> Document mm_fw_cfg_init() return value must be released
> with g_free(). mm_fw_cfg_uninit() was never used, remove it.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> tests/libqos/fw_cfg.c | 5 -----
> tests/libqos/fw_cfg.h | 10 +++++++++-
> 2 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/tests/libqos/fw_cfg.c b/tests/libqos/fw_cfg.c
> index 37c3f2cf4d..ddeec821db 100644
> --- a/tests/libqos/fw_cfg.c
> +++ b/tests/libqos/fw_cfg.c
> @@ -126,11 +126,6 @@ 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);
> diff --git a/tests/libqos/fw_cfg.h b/tests/libqos/fw_cfg.h
> index 15604040bd..3247fd4000 100644
> --- a/tests/libqos/fw_cfg.h
> +++ b/tests/libqos/fw_cfg.h
> @@ -34,8 +34,16 @@ uint64_t qfw_cfg_get_u64(QFWCFG *fw_cfg, uint16_t key);
> size_t qfw_cfg_get_file(QFWCFG *fw_cfg, const char *filename,
> void *data, size_t buflen);
>
> +/**
> + * mm_fw_cfg_init():
> + * @qts: The #QTestState that will be referred to by the QFWCFG object.
> + * @base: The MMIO base address of the fw_cfg device in the guest.
> + *
> + * Returns a newly allocated QFWCFG object which must be released
> + * with a call to g_free() when no longer required.
> + */
> QFWCFG *mm_fw_cfg_init(QTestState *qts, uint64_t base);
> -void mm_fw_cfg_uninit(QFWCFG *fw_cfg);
> +
> /**
> * io_fw_cfg_init():
> * @qts: The #QTestState that will be referred to by the QFWCFG object.
>
Sigh, we've never even called this function :/
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
next prev parent reply other threads:[~2019-10-04 18:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-03 22:54 [PATCH 0/7] fw_cfg: Run tests on big-endian Philippe Mathieu-Daudé
2019-10-03 22:54 ` [PATCH 1/7] tests/libqos/fw_cfg: Document io_fw_cfg_init to drop io_fw_cfg_uninit Philippe Mathieu-Daudé
2019-10-04 18:39 ` Laszlo Ersek
2019-10-03 22:54 ` [PATCH 2/7] tests/libqos/fw_cfg: Document mm_fw_cfg_init to drop mm_fw_cfg_uninit Philippe Mathieu-Daudé
2019-10-04 18:40 ` Laszlo Ersek [this message]
2019-10-03 22:54 ` [PATCH 3/7] tests/libqos/fw_cfg: Document pc_fw_cfg_init to drop pc_fw_cfg_uninit Philippe Mathieu-Daudé
2019-10-04 18:42 ` Laszlo Ersek
2019-10-03 22:54 ` [PATCH 4/7] tests/fw_cfg: Let the tests use a context Philippe Mathieu-Daudé
2019-10-04 18:50 ` Laszlo Ersek
2019-10-03 22:54 ` [PATCH 5/7] tests/libqos/fw_cfg: Pass QTestState as argument Philippe Mathieu-Daudé
2019-10-04 18:57 ` Laszlo Ersek
2019-10-03 22:54 ` [PATCH 6/7] tests/fw_cfg: Declare one QFWCFG for all tests Philippe Mathieu-Daudé
2019-10-04 19:04 ` Laszlo Ersek
2019-10-03 22:54 ` [PATCH 7/7] tests/fw_cfg: Run the tests on big-endian targets Philippe Mathieu-Daudé
2019-10-04 8:05 ` Laurent Vivier
2019-10-04 8:53 ` Philippe Mathieu-Daudé
2019-10-04 8:59 ` Laurent Vivier
2019-10-04 9:03 ` Philippe Mathieu-Daudé
2019-10-04 9:14 ` Laurent Vivier
2019-10-04 9:18 ` Philippe Mathieu-Daudé
2019-10-07 6:17 ` Thomas Huth
2019-10-04 0:12 ` [PATCH 0/7] fw_cfg: Run tests on big-endian no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=137fead7-0e93-7d86-dadd-68e0569cdb7b@redhat.com \
--to=lersek@redhat.com \
--cc=kraxel@redhat.com \
--cc=liq3ea@gmail.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).