From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 078C9C433FE for ; Thu, 23 Sep 2021 12:15:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B413D610A0 for ; Thu, 23 Sep 2021 12:15:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B413D610A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:59766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTNdj-0002RX-Tv for qemu-devel@archiver.kernel.org; Thu, 23 Sep 2021 08:15:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTNaB-0008F0-9O for qemu-devel@nongnu.org; Thu, 23 Sep 2021 08:12:07 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:36714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTNa7-00006d-Jf for qemu-devel@nongnu.org; Thu, 23 Sep 2021 08:12:05 -0400 Received: by mail-wr1-x42c.google.com with SMTP id g16so16598251wrb.3 for ; Thu, 23 Sep 2021 05:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hveLEdA+sdzfjh3b2QjPTxzFWqeMryq8cwWocCTW/OE=; b=j1fNH08s2uBrT8LvoxbJvVWN8c/5DWkj+rLsOrs0zXiX+Ve14tLa4SRc7rJOjLXAJt 6a4WEfCpd00A0DMFRLfisT7B97VBHaeXeOkUGudMN1+5bp0QGosp23EU08QUJlgnsCKm fSAzM69H10fs/0KL8qrVwRNFkLxFrOjBnZ1BalxG7TuPBT9Rgkk4mSduYy+p1H70no+E CZ5eWyYBXINT9DCkwLXFX4B+HBVwsVM1Tp7h7pBsXG6aBEe2a/OeLKxNwBKPHJLR2v+a QbKU5oszyN+dj1qn/MSm4SE5d1KCmHrf5B7+oFkSNDAVlOw+1ywxUQ5d05s/jLGMRpnc RO7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hveLEdA+sdzfjh3b2QjPTxzFWqeMryq8cwWocCTW/OE=; b=N9wBSuvPEWnKs99W/NJ3O5angllz1KuOs+4SLEXYfS7zj317mDpok0rwBInz6xH570 cehQvve0n6GXSeg4xaWKi62i0TEqYotf9YeIWWURaPIT+DJcP6fnRh2SAOriTJVqYJq0 APH+IP0pd3sU3lVTaCoFG7olkYjiEbXcioNY1SR03O8Be1uqxqScbfjFFeOOVBfPsuEu hUViFhcCR9tObY6Gnl2dkh0YxIyYXxFhXx7Zhny6R4YcLusyYwLI/1+rXk+YDTQQ6E3U gTVYIjIsZHOk4RQkBu9Wlp2mtlSo3aYN0hLe2j0KrBzvFLDBi6+45OdI+ZDLchztl55T HAyA== X-Gm-Message-State: AOAM5301q0JNbI6PiVB1+XwFnORAk9a4HSrCoyEUyPg7M26//WAJ1YyS WPy8kPnsJoq+nZCp5W49uZl2kdozWCUcCg== X-Google-Smtp-Source: ABdhPJzw0m0XrDO2vV8Vl19H8gZwUzAj0Jpb6uihj2MwYhR9c1RlHDNa0b7cLhDeUY0z0lcZoi2Hxg== X-Received: by 2002:a1c:7d4d:: with SMTP id y74mr4009549wmc.181.1632399118452; Thu, 23 Sep 2021 05:11:58 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id t22sm1382349wmj.30.2021.09.23.05.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 05:11:58 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH 2/6] ipack: Rename ipack_bus_new_inplace() to ipack_bus_init() Date: Thu, 23 Sep 2021 13:11:49 +0100 Message-Id: <20210923121153.23754-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210923121153.23754-1-peter.maydell@linaro.org> References: <20210923121153.23754-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Alberto Garcia , Eduardo Habkost , "Michael S . Tsirkin" , "Daniel P. Berrange" , Markus Armbruster , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename ipack_bus_new_inplace() to ipack_bus_init(), to bring it in to line with a "_init for in-place init, _new for allocate-and-return" convention. Drop the 'name' argument, because the only caller does not pass in a name. If a future caller does need to specify the bus name, we should create an ipack_bus_init_named() function at that point. Signed-off-by: Peter Maydell --- include/hw/ipack/ipack.h | 8 ++++---- hw/ipack/ipack.c | 10 +++++----- hw/ipack/tpci200.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/hw/ipack/ipack.h b/include/hw/ipack/ipack.h index 75014e74ae1..cbcdda509d3 100644 --- a/include/hw/ipack/ipack.h +++ b/include/hw/ipack/ipack.h @@ -73,9 +73,9 @@ extern const VMStateDescription vmstate_ipack_device; VMSTATE_STRUCT(_field, _state, 1, vmstate_ipack_device, IPackDevice) IPackDevice *ipack_device_find(IPackBus *bus, int32_t slot); -void ipack_bus_new_inplace(IPackBus *bus, size_t bus_size, - DeviceState *parent, - const char *name, uint8_t n_slots, - qemu_irq_handler handler); +void ipack_bus_init(IPackBus *bus, size_t bus_size, + DeviceState *parent, + uint8_t n_slots, + qemu_irq_handler handler); #endif diff --git a/hw/ipack/ipack.c b/hw/ipack/ipack.c index f19ecaeb1cf..d28e7f6449e 100644 --- a/hw/ipack/ipack.c +++ b/hw/ipack/ipack.c @@ -30,12 +30,12 @@ IPackDevice *ipack_device_find(IPackBus *bus, int32_t slot) return NULL; } -void ipack_bus_new_inplace(IPackBus *bus, size_t bus_size, - DeviceState *parent, - const char *name, uint8_t n_slots, - qemu_irq_handler handler) +void ipack_bus_init(IPackBus *bus, size_t bus_size, + DeviceState *parent, + uint8_t n_slots, + qemu_irq_handler handler) { - qbus_create_inplace(bus, bus_size, TYPE_IPACK_BUS, parent, name); + qbus_create_inplace(bus, bus_size, TYPE_IPACK_BUS, parent, NULL); bus->n_slots = n_slots; bus->set_irq = handler; } diff --git a/hw/ipack/tpci200.c b/hw/ipack/tpci200.c index d107e134c4e..1f764fc85ba 100644 --- a/hw/ipack/tpci200.c +++ b/hw/ipack/tpci200.c @@ -611,8 +611,8 @@ static void tpci200_realize(PCIDevice *pci_dev, Error **errp) pci_register_bar(&s->dev, 4, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->las2); pci_register_bar(&s->dev, 5, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->las3); - ipack_bus_new_inplace(&s->bus, sizeof(s->bus), DEVICE(pci_dev), NULL, - N_MODULES, tpci200_set_irq); + ipack_bus_init(&s->bus, sizeof(s->bus), DEVICE(pci_dev), + N_MODULES, tpci200_set_irq); } static const VMStateDescription vmstate_tpci200 = { -- 2.20.1