From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Michael Tokarev" <mjt@tls.msk.ru>,
"Laurent Vivier" <laurent@vivier.eu>,
"Peter Maydell" <peter.maydell@linaro.org>
Subject: [PULL 03/10] qdev: Complete qdev_init_gpio_out() documentation
Date: Thu, 16 Sep 2021 16:10:19 +0200 [thread overview]
Message-ID: <20210916141026.1174822-4-laurent@vivier.eu> (raw)
In-Reply-To: <20210916141026.1174822-1-laurent@vivier.eu>
From: Philippe Mathieu-Daudé <philmd@redhat.com>
qdev_init_gpio_out() states it "creates an array of anonymous
output GPIO lines" but doesn't document how this array is
released. Add a note that it is automatically free'd in qdev
instance_finalize().
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210819142731.2827912-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
include/hw/qdev-core.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 762f9584dde1..34c8a7506a1b 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -598,6 +598,10 @@ void qdev_init_gpio_in(DeviceState *dev, qemu_irq_handler handler, int n);
*
* See qdev_connect_gpio_out() for how code that uses such a device
* can connect to one of its output GPIO lines.
+ *
+ * There is no need to release the @pins allocated array because it
+ * will be automatically released when @dev calls its instance_finalize()
+ * handler.
*/
void qdev_init_gpio_out(DeviceState *dev, qemu_irq *pins, int n);
/**
--
2.31.1
next prev parent reply other threads:[~2021-09-16 14:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 14:10 [PULL 00/10] Trivial branch for 6.2 patches Laurent Vivier
2021-09-16 14:10 ` [PULL 01/10] util: Remove redundant checks in the openpty() Laurent Vivier
2021-09-16 14:10 ` [PULL 02/10] hw/i386/acpi-build: Fix a typo Laurent Vivier
2021-09-16 14:10 ` Laurent Vivier [this message]
2021-09-16 14:10 ` [PULL 04/10] spelling: sytem => system Laurent Vivier
2021-09-16 14:10 ` [PULL 05/10] configure: add missing pc-bios/qemu_vga.ndrv symlink in build tree Laurent Vivier
2021-09-16 14:10 ` [PULL 06/10] target/i386: spelling: occured=>occurred, mininum=>minimum Laurent Vivier
2021-09-16 14:10 ` [PULL 07/10] intel_iommu: Fix typo in comments Laurent Vivier
2021-09-16 14:10 ` [PULL 08/10] hw/vfio: " Laurent Vivier
2021-09-16 14:10 ` [PULL 09/10] target/avr: Fix compiler errors (-Werror=enum-conversion) Laurent Vivier
2021-09-16 14:10 ` [PULL 10/10] target/sparc: Make sparc_cpu_dump_state() static Laurent Vivier
2021-09-16 20:08 ` [PULL 00/10] Trivial branch for 6.2 patches Peter Maydell
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=20210916141026.1174822-4-laurent@vivier.eu \
--to=laurent@vivier.eu \
--cc=mjt@tls.msk.ru \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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).