From nobody Thu Dec 18 19:32:57 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1633016089; cv=none; d=zohomail.com; s=zohoarc; b=cSzbM0J70V4QpJ//7nHZ83MXhyr7q//qQzFJRFTfuBkPcJTivwo2kj+P9tFz3czUuRIFvKeNnrlabX01hWlSOljXk7/YdPE3xCO3YDUPxUne+rV5UKsUWqSnABLBmQETcQjGrzsvDTlgsBOA4GlEAwUX122XdI3+0j973V6/zWI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633016089; h=Content-Type:Content-Transfer-Encoding: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=zPpRQrWSyjrRJfT0bIIpJXg1qS4RrwpRld2bjFRckaw=; b=lUV1H9ZBKFEK/4IevL/2V/HVTdsdIBnMrCoVsj8mn+6YFSfnWUw5sWpK/UAVt7pig0r1WvpCS8Is2+tWso12UMYDx/yJ2OHyTeqQ1IrgJFlO9oBOhakXaE09SNooZBL/Qr5n20EKvEGBdOkShkMhQPoIy6ioz01+GbdNl8F511I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163301608938987.34986721217399; Thu, 30 Sep 2021 08:34:49 -0700 (PDT) Received: from localhost ([::1]:45814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVy5A-0000lZ-8N for importer@patchew.org; Thu, 30 Sep 2021 11:34:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVxjR-0000J2-KP for qemu-devel@nongnu.org; Thu, 30 Sep 2021 11:12:21 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:43930) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVxjP-00044X-Ai for qemu-devel@nongnu.org; Thu, 30 Sep 2021 11:12:21 -0400 Received: by mail-wr1-x432.google.com with SMTP id x20so10642236wrg.10 for ; Thu, 30 Sep 2021 08:12:18 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id g8sm1952098wrm.46.2021.09.30.08.12.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 08:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=zPpRQrWSyjrRJfT0bIIpJXg1qS4RrwpRld2bjFRckaw=; b=bRs+islmHLkB3MMy7DkBIu15VNGnQJ08mxpv4Z8jjk1jkgnqZNvLCp6+kqZYM/4/Lj iOpxfAkm/lG0i0AijrVMTvXsqgXBc86uAMyp+2Yko+PEze2MTrozGGnSTHOoAqOypAxP 7KmoEoBnjcM86MJgw3d2u58xHUFCEzbbQyiaYu/rWarV4EySefOcGv6xz5/Fwc3JhTac 7XeIBsy1JCPmMQnq53Mr3ZPr8u3v2u2+DeiEXN2DiWUvOVEKX0MYtvZrAX8BHikxdbNp UWI+OI6bGh/7miv5SLn8zZ6LvbV5uJpCQBHUdLUOyAh4fRdFnKSn1iY6Ao6ZotidPJd6 tr8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zPpRQrWSyjrRJfT0bIIpJXg1qS4RrwpRld2bjFRckaw=; b=qzEOOg8YiOxJZb7prtCcyOiZ9Eme1cGD6zqjfHscvVEZ9EShbHVvNWp63wXgC2cPBd vtGiONrcx5J0NN0MCSh98rM7mHJViN9e7xlIKUl/7X/fffh8COzuJ4w3fPEGPbAjXRAR 2rkqfMnEF3k3OHiMQmrSpYWqRhjBpNMEIeOD0A63HY8eHcsCdTN8PNssu6WjmjssuWZz d7H2oLo2/3JngozrdYVwXzmDryabgpo5asdHyUtFZ80m46l6y+JuSjrBVieq9XgoXYrz RXs6pOPS/LRc32GoZcqE+xDMSXFcgSZLNjXDT7Udr58H5N5QY/YSVhnkXHHlCcq2HmQ2 1gCw== X-Gm-Message-State: AOAM532gijxRjZCV/9Iyub2nufb4WMwerVlNwcap1fuHADMtxkFQahT4 4fIPLLFUGuIE1QZAxRkWlMYCKt+WFou0Jw== X-Google-Smtp-Source: ABdhPJyORZm/k0lDdg8hAMszK36ANFeYMG06Rl2R372I+mw1AFEoy1XoyoZxgJMaLiCUC2ZjxANanA== X-Received: by 2002:a05:6000:188d:: with SMTP id a13mr6926982wri.103.1633014737391; Thu, 30 Sep 2021 08:12:17 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/22] ipack: Rename ipack_bus_new_inplace() to ipack_bus_init() Date: Thu, 30 Sep 2021 16:11:56 +0100 Message-Id: <20210930151201.9407-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210930151201.9407-1-peter.maydell@linaro.org> References: <20210930151201.9407-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1633016090545100001 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin Message-id: 20210923121153.23754-3-peter.maydell@linaro.org --- 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) =20 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); =20 #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 s= lot) return NULL; } =20 -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 =3D n_slots; bus->set_irq =3D 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); =20 - 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); } =20 static const VMStateDescription vmstate_tpci200 =3D { --=20 2.20.1