From nobody Sat Feb 7 06:40:09 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=libvir-list-bounces@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=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615449157; cv=none; d=zohomail.com; s=zohoarc; b=FMSWKaCJisavCfR56c/cAIiM0ezcWl2WekwkO6QkCidW4WFT5cZutANSR7Tr+KL08cuSrPnHqATi1lhIjCMTs7EBfmF4x+fRVTuqu4lZL8F0NG5VHNUvXvz8n1i40oPaDODFW3DjisfH35M8JGNGS7vezIKfe/32VnMK4LjoaA8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615449157; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jO/U9oC1uDnEofr01HB/mG7JYp6NvbgVHNrMl4bHw1U=; b=HqCE30Fagp+80t6A0GCBGxYHleBTrlZL4uZxQ0lD3nbadeCKK/JCV8EMYw1NlerkEHgyPgD6R6xD9aNMXri36EkixcnWOPhdCXH5HcmQkzeodfQrGqB/GdVxDIv1HQgUdRMxFALRUJIZcVu2LED3dqDzrCElXsDmr1y9Y10N/ds= 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=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: 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 1615449157556623.0835582252761; Wed, 10 Mar 2021 23:52:37 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-181-JqA4LSXLOpyg7ppztUna4w-1; Thu, 11 Mar 2021 02:52:34 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4C5C910866AA; Thu, 11 Mar 2021 07:52:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F2B2C5C1BD; Thu, 11 Mar 2021 07:52:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 08CF418006D9; Thu, 11 Mar 2021 07:52:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12B7qQKi004878 for ; Thu, 11 Mar 2021 02:52:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 550DF5DF26; Thu, 11 Mar 2021 07:52:26 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-83.phx2.redhat.com [10.3.112.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 06F1D5DEF9; Thu, 11 Mar 2021 07:52:23 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8DA8E1131C01; Thu, 11 Mar 2021 08:52:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615449156; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jO/U9oC1uDnEofr01HB/mG7JYp6NvbgVHNrMl4bHw1U=; b=Aa4KYQaMdPzcPMJbY96JaSa+LVW9AOdqLf1O5zZyLpqrHhzBvbatOrGfK2noOzz7muCQrw 8RIKCwVIeX6yi1U5oPHOw8AZpJVILennCVRdCHmWLiwv4lmt+lY/Hv9yZ7fl93xVbjxZW6 zJ8yF2z4E6CsoTPhWJTpC3WvSeVRAdc= X-MC-Unique: JqA4LSXLOpyg7ppztUna4w-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v4 3/4] fdc: Inline fdctrl_connect_drives() into fdctrl_realize_common() Date: Thu, 11 Mar 2021 08:52:20 +0100 Message-Id: <20210311075221.1795266-4-armbru@redhat.com> In-Reply-To: <20210311075221.1795266-1-armbru@redhat.com> References: <20210311075221.1795266-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: kwolf@redhat.com, qemu-block@nongnu.org, libvir-list@redhat.com, richard.henderson@linaro.org, mreitz@redhat.com, jsnow@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@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) The previous commit rendered the name fdctrl_connect_drives() somewhat misleading. Get rid of it by inlining the (now pretty simple) function into its only caller. Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrang=C3=A9 --- hw/block/fdc.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index f978ddf647..5210ab85e2 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -2511,20 +2511,6 @@ void isa_fdc_init_drives(ISADevice *fdc, DriveInfo *= *fds) fdctrl_init_drives(&ISA_FDC(fdc)->state.bus, fds); } =20 -static void fdctrl_connect_drives(FDCtrl *fdctrl, DeviceState *fdc_dev, - Error **errp) -{ - unsigned int i; - FDrive *drive; - - for (i =3D 0; i < MAX_FD; i++) { - drive =3D &fdctrl->drives[i]; - drive->fdctrl =3D fdctrl; - fd_init(drive); - fd_revalidate(drive); - } -} - void fdctrl_init_sysbus(qemu_irq irq, int dma_chann, hwaddr mmio_base, DriveInfo **fds) { @@ -2604,7 +2590,14 @@ static void fdctrl_realize_common(DeviceState *dev, = FDCtrl *fdctrl, } =20 floppy_bus_create(fdctrl, &fdctrl->bus, dev); - fdctrl_connect_drives(fdctrl, dev, errp); + + for (i =3D 0; i < MAX_FD; i++) { + FDrive *drive =3D &fdctrl->drives[i]; + + drive->fdctrl =3D fdctrl; + fd_init(drive); + fd_revalidate(drive); + } } =20 static const MemoryRegionPortio fdc_portio_list[] =3D { --=20 2.26.2