From nobody Mon Feb 9 00:07:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1629383256; cv=none; d=zohomail.com; s=zohoarc; b=iz6+XCJMkzWJdF/iqOp5LdVcnIjsyqVQSp5Okz0xkMX5mOh9hdAQs3nHbe0oEIXGvo4NqxvjmHmTCBER//KHHX3y60PGQtyJHvh0zNe/v8DCkkcltaX2i4J6UzGPshRC8OPxISHm0Vv5SrzZU/0fe3QOLVkPVzdMhlst19do1M4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629383256; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=tJFUZV0HYOoBrQde2uSQFwBIu08Ozl1W1lap6Ce8CL0=; b=QcxP/PgTLHicD6BE8rCT43Ms8Uq+6lPug28O6kJq9WMdeqzYurVkeiv6egMkWpg0Hc/Ffa0l+D3udDPhYsbHti6pITfW1U0lZIOV8JHH9LhsPmGKao7LpmhygVWiPtKkueqPwLIY/QTJXW9vLcPK6SDSJLIaBK/fbG6l5WR+dFI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1629383256519581.3125797920121; Thu, 19 Aug 2021 07:27:36 -0700 (PDT) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-141-T-eq4NQgP_6gKw3c__CDPw-1; Thu, 19 Aug 2021 10:27:34 -0400 Received: by mail-wr1-f72.google.com with SMTP id x18-20020a5d49120000b0290154e9dcf3dbso1753188wrq.7 for ; Thu, 19 Aug 2021 07:27:34 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (163.red-83-52-55.dynamicip.rima-tde.net. [83.52.55.163]) by smtp.gmail.com with ESMTPSA id e17sm3079334wru.7.2021.08.19.07.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Aug 2021 07:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629383255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJFUZV0HYOoBrQde2uSQFwBIu08Ozl1W1lap6Ce8CL0=; b=Ahy2C1UmHGaAuRH8//vJho6JuVfw38BcK6aMBfeTsSgW8pBpTrxIa6wbPmwJ2/Kkvkncen c1SVuDcrAiAZk8ho8mFdcaeDcJmGpvKretXHzJyDo9XAtBqBUIZWiIkGjuoQlkzJZhFDzx mldzp/INTUK1/8b7/Z6YBUbCgldEZc8= X-MC-Unique: T-eq4NQgP_6gKw3c__CDPw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tJFUZV0HYOoBrQde2uSQFwBIu08Ozl1W1lap6Ce8CL0=; b=rCpCvUPjO5w7395Mf2EvzCH3fzXk8CQ28yTpJ3yF+v08b4G3Vt9iG2LVjFItkl9CUb aMNdEc36OwyRq5n4HV6k5szHJqkDLw1EvLt6LJNwnh0XYyNFYeZxo++l0/H7S7gWXKs4 j0WsOxldK1j2mDymkYgoTYU1DCFn2zJS88G8j78I0ceqHPrGqi5xi+dzfKRmFXHdA2e3 LbFCqt57Gqi+Hz82V7+XE3XwdSvZbTz0R0nmM4KhIQ9noBzV7cseTiAlgkqtq/9YjDDa xAfvq83Sj879UqFXdahuQBvfXCe1duHi3kXr8oV352Y1ZeBRB6mB7pEEyGcMZWu2ukd1 w0/g== X-Gm-Message-State: AOAM532akCj62p+KOd2TsbXEPD8MG5ocjDb2EjXNNXB9E2YDv+XwoiUf Zv4suB9Mj/bpwScsk/ChVmSrsysVEsBxLVAecXjKOclOAjDcxSZAOCyYnlL/uyjzH1B1KD5SXbw ZUcV3NVm4KAa/tg== X-Received: by 2002:adf:d085:: with SMTP id y5mr4305286wrh.209.1629383253326; Thu, 19 Aug 2021 07:27:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKd9eo0TZXUBdRJK94uQ7E0gAgVLbM+f2UmYpa7EWyArZDym3WTKktV7hob3zR9t2hXI9P6w== X-Received: by 2002:adf:d085:: with SMTP id y5mr4305263wrh.209.1629383253126; Thu, 19 Aug 2021 07:27:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Paolo Bonzini , Markus Armbruster , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH] qdev: Complete qdev_init_gpio_out() documentation Date: Thu, 19 Aug 2021 16:27:31 +0200 Message-Id: <20210819142731.2827912-1-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1629383257552100001 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=C3=A9 Reviewed-by: Peter Maydell --- 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 bafc311bfa1..555d4e444a5 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -597,6 +597,10 @@ void qdev_init_gpio_in(DeviceState *dev, qemu_irq_hand= ler 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); /** --=20 2.31.1