From patchwork Fri Feb 16 11:02:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 773324 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp1288046wre; Fri, 16 Feb 2024 03:10:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWMswTIffEE7H5d0XLuFYWcan2tVNNtVgJCASukHDqaHm7IOwifhfYfVglzIU22ZAYaVTmDeNWHLN6C63/9F8lf X-Google-Smtp-Source: AGHT+IEZkQhivtsNT0nOZLbLCzpx41HodA1TSyPcoWc2b9vQ5r0K+Bw2eGWkKQi5btQBQ48F/BKZ X-Received: by 2002:a05:620a:816:b0:787:3e4e:f04 with SMTP id s22-20020a05620a081600b007873e4e0f04mr2901465qks.66.1708081845474; Fri, 16 Feb 2024 03:10:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708081845; cv=none; d=google.com; s=arc-20160816; b=iHM955uV20Hfr/cKkaFhdmEG2NentKE61pThsIHKJzwOoN5SyR3vJuBqzt3iZ+8veq 6SEntDIuR9YoZLU78tOu5tKD68nF7c5AP3GX57zKM9dTImXa+R6jM5xhMqrnbOfekztb n2wyAQUQfc2ZhyGjhw4bQGUiZzCWUZABArhSupGVu0JazvpBgc1M1mNeSphKKj3y66K6 CGmPgrmNSMWE8A4Zf0/nVHSQemV3lGgzyZIwWYT2BpDcLgOEmziyz0Dtit+H/pfMbfOq dg4/mKi4G1KUiHJn2LznKCi7wn/C3DSC2GTKMu1OtmGKIFrixYYC0lwL31qNxhYLvGy+ e7pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xmVGPYBQPq46VUwxkc77izpk+jGAawySTXLarOn7Kps=; fh=qGhmSOrbdn1Y+K68hTdbBBBTMW2i6vZu0jTJfcFCtbY=; b=cKUd16ORN9/M1VPcD+X7nwdFWOKtT/MJHJhTbD5CpRkKDJPDY4dRllNR3TBfKrPqtd OQ6+p8/2tbGmZPvWTEnw9PUSVt9Rv8VWLdqgj7/s6NIyZqqQpfsn/l1QyPXTtnvCvIyw QVswv+LgsYAN6VNZdiVl+Lb8awq48+RtjcVn3gRz+bVP0qKddtlYKTZqZ5fpBJeFMB7E NvMrRMK2+P9Xtun7iexjtB8qMHd7lp5GMEnVECVRYLtHx3NxI/XjsM0G8lXTCNUGu/0J J+r+fG3O/J3aELBmrJBwCZXG1r1yAB9zJsB7tRP9pYvsipNDvTYfUi5Q7hTpfmb5ftG/ 4ToA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gm+E4p3y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g2-20020a05620a40c200b00786fe4117fcsi3960271qko.388.2024.02.16.03.10.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Feb 2024 03:10:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gm+E4p3y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raw11-00070D-JR; Fri, 16 Feb 2024 06:04:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1raw0x-0006qt-F4 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:21 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw0q-00010T-7z for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:04:17 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4124c3a7a75so2534895e9.0 for ; Fri, 16 Feb 2024 03:04:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081448; x=1708686248; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xmVGPYBQPq46VUwxkc77izpk+jGAawySTXLarOn7Kps=; b=Gm+E4p3yblgCXSJ42IVeSIMR18y1d+Lb6ZpMjvT+QCmcvRshvJmEhOoo/o4pDsY1wn r5yyv16wHznHhFfrLrYAYL9QXyGuJbnAN1m4MC8ErvoN1W3niZyV8HZoyUrg/QAFABwV SIrsJDUuNLIH2Mf8QAqzjAqiqPHZXxUG7iUUkDBojPXOeTBn5Qf4eJMDv8QcTiPGj158 u7ASomjPDNp0vGuHBf+c5yRutxzp6T3JkznIHTJ9pR1L7XjYk3EafMkG9SazH7020DXH NFxId7bTp9RAvrslOlmaV/pYOGIm/RozmERAU/P074z03TTUeg2NGPEpsmuNK9ScK+KI J8Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081448; x=1708686248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xmVGPYBQPq46VUwxkc77izpk+jGAawySTXLarOn7Kps=; b=ZLZk0NDrINRpk+jgeGIVGcGG398U2Cj5QtP3mEqhn8af/mNYSrAUmubAze2Rkxbk7T maw48PddTW2xAVwtKXTOMfecQUt1xcR5yvl0bhnnNme9R6r0X3GktE8GYW2EZ5X7U7BY GZ1rzCPOhN2fbD7HU9j+TbgU56hgCzrY3XH42wfA+DT+9bbZEZYx/Lb0GSfFPwmtjhzp jh1EhTfW7YQTYyE3BpC4wQQCG+0393AUEpss7IiW6odmDg7DIDTyPgIqUSZrMl3NAIXy twWrOnL9jF2zrgo+lF+oM29vGxFw7n+SGunXiCWEpFGqJsv1gGFvBu9erA+ZdKtGb97D ax+w== X-Gm-Message-State: AOJu0YzUwVHnZ0dXxGpfiBNbFqaEazxALQLmYWj1J87+OuOkODVZAMNC IXL/I67shsYHnonbk81/ufdohzMu539lE9UgiVhzlzEWa46glOPhRbQspgBqs4QfLt440hEbfOO 7 X-Received: by 2002:a05:600c:3ca6:b0:40f:c404:e2d1 with SMTP id bg38-20020a05600c3ca600b0040fc404e2d1mr3937401wmb.19.1708081448655; Fri, 16 Feb 2024 03:04:08 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id s1-20020adff801000000b0033d01fe1f04sm1881745wrp.55.2024.02.16.03.04.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:04:07 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Richard Henderson , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum , Jason Wang Subject: [PATCH 08/21] hw/isa: Inline isa_try_new() Date: Fri, 16 Feb 2024 12:02:59 +0100 Message-ID: <20240216110313.17039-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Inline the 2 single uses of isa_try_new(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/isa/isa.h | 1 - include/hw/net/ne2000-isa.h | 2 +- hw/i386/pc.c | 2 +- hw/isa/isa-bus.c | 5 ----- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 40d6224a4e..8475120849 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -81,7 +81,6 @@ IsaDma *isa_bus_get_dma(ISABus *bus, int nchan); */ qemu_irq isa_bus_get_irq(ISABus *bus, unsigned irqnum); ISADevice *isa_new(const char *name); -ISADevice *isa_try_new(const char *name); bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp); ISADevice *isa_create_simple(ISABus *bus, const char *name); diff --git a/include/hw/net/ne2000-isa.h b/include/hw/net/ne2000-isa.h index 73bae10ad1..2440ac8621 100644 --- a/include/hw/net/ne2000-isa.h +++ b/include/hw/net/ne2000-isa.h @@ -22,7 +22,7 @@ static inline ISADevice *isa_ne2000_init(ISABus *bus, int base, int irq, { ISADevice *d; - d = isa_try_new(TYPE_ISA_NE2000); + d = ISA_DEVICE(qdev_try_new(TYPE_ISA_NE2000)); if (d) { DeviceState *dev = DEVICE(d); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 3c00a87317..e8130774ad 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1183,7 +1183,7 @@ static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl, i8042 = isa_create_simple(isa_bus, TYPE_I8042); if (!no_vmport) { isa_create_simple(isa_bus, TYPE_VMPORT); - vmmouse = isa_try_new("vmmouse"); + vmmouse = ISA_DEVICE(qdev_try_new("vmmouse")); } else { vmmouse = NULL; } diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index f1e0f14007..8aaf44a3ef 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -158,11 +158,6 @@ ISADevice *isa_new(const char *name) return ISA_DEVICE(qdev_new(name)); } -ISADevice *isa_try_new(const char *name) -{ - return ISA_DEVICE(qdev_try_new(name)); -} - ISADevice *isa_create_simple(ISABus *bus, const char *name) { ISADevice *dev;