From patchwork Thu Feb 15 15:33:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marcin Juszkiewicz X-Patchwork-Id: 772905 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp891824wre; Thu, 15 Feb 2024 07:34:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWdfkGK5eLENbSkeMUdWT5cNi34/YF1FBk9ZmZJtdta4f3i1gf7651u2v7oHmquHC36qtb95h2M/AusWRV58Qp5 X-Google-Smtp-Source: AGHT+IEegWCpBBfH646VhZ+TSjjAIh+R4+UF1hW0dep7WRpSBSUrSyZAcjauRx3cIQV815zjDhww X-Received: by 2002:a05:622a:34d:b0:42d:c712:ce76 with SMTP id r13-20020a05622a034d00b0042dc712ce76mr3151117qtw.4.1708011252726; Thu, 15 Feb 2024 07:34:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708011252; cv=none; d=google.com; s=arc-20160816; b=nG2yUMgYfK0IPXrbCIuyklLSGMc8RykMSuAxdB4QrYqh0LiDLSiLbkBK/xRNrSydUW rOmmJZ0u9Dl9aWDT1on9OZ4bY6YmyOnGlxHgDMZYxJPPTKC3jioTSg5TezqmGrVUIxLD r4ZZteR7TrlMOKYcpvdyN0IRiBvjTh034aLD7L/XAf+khwm6bt4XWaYVvfbUNRWXbfpp i6Fx53knMhgMxJscLqhEWCapcE0lxT1C0pGSEV1hHH9GusNdbg56H12ahVwRMJ0tRz1u PIS0nH220aPbe6/kqQYaIPUysbw62PYPVzdZurn08G3P2hN5iHpEQicZnjHX5kS5UrKd 5dew== 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:message-id:date:subject:cc:to:from; bh=rQI3dKoe33nR7IvbUfLxfMHLbcxPgsb2607luIYy514=; fh=nKl8/G0rxCW7ugooXfO2GeaKcEIa1k4pK3AumDOEz4g=; b=OYmTCskO6kB+VeCr+ieZe4f2jnAv8dsGxfMct/2ZUOyceIt/ClMsA5gF6tBt5nXxTB xWS9Sl2KtMQRaO/awOnb8WxWzWMrbMXvgwgLkoxfEGAuWstffBy7A0p2cnXwfXojDC7z S/gfDubE3ygdOnbZ6HA0WQE8j6bfdahdGly4xg8s/F/YMvdPbPZo1fIj/8pPqBLF7Sj1 XaLw08y7AmNT2AJBb0MggDChWDYDYuEI0oTx2RrZhRWOgOW5TPQZN81Vj5b116Ojo5Ro VNRcMifTX46nsEQ1v/YxoEFWnP6i+24GZgFGd2wHoX/Lk1phwi3iTyW8BFVc9YmDv/6W iElg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 d3-20020ac86683000000b0042d345271d8si1549943qtp.11.2024.02.15.07.34.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 07:34:12 -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; 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=fail (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 1radk4-0003xz-NR; Thu, 15 Feb 2024 10:33:40 -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 1radk2-0003ha-5Y; Thu, 15 Feb 2024 10:33:38 -0500 Received: from muminek.juszkiewicz.com.pl ([213.251.184.221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1radjy-00021D-HL; Thu, 15 Feb 2024 10:33:36 -0500 Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id C95E5261259; Thu, 15 Feb 2024 16:33:29 +0100 (CET) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id CC1a2OS8hMgO; Thu, 15 Feb 2024 16:33:27 +0100 (CET) Received: from applejack.lan (83.11.22.32.ipv4.supernova.orange.pl [83.11.22.32]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 5813826018B; Thu, 15 Feb 2024 16:33:27 +0100 (CET) From: Marcin Juszkiewicz To: qemu-devel@nongnu.org Cc: Peter Maydell , Leif Lindholm , Radoslaw Biernacki , qemu-arm@nongnu.org, Marcin Juszkiewicz Subject: [PATCH 1/1] hw/arm/sbsa-ref: Simplify init since PCIe is always enabled Date: Thu, 15 Feb 2024 16:33:01 +0100 Message-ID: <20240215153311.186772-1-marcin.juszkiewicz@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Received-SPF: softfail client-ip=213.251.184.221; envelope-from=marcin.juszkiewicz@linaro.org; helo=muminek.juszkiewicz.com.pl X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, 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 There is no point in checking do we have PCIe if first thing after check is adding PCIe card without checking. Signed-off-by: Marcin Juszkiewicz Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/sbsa-ref.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index f2adf30337..b7d6ba2351 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -672,9 +672,8 @@ static void create_pcie(SBSAMachineState *sms) } pci = PCI_HOST_BRIDGE(dev); - if (pci->bus) { - pci_init_nic_devices(pci->bus, mc->default_nic); - } + + pci_init_nic_devices(pci->bus, mc->default_nic); pci_create_simple(pci->bus, -1, "bochs-display");