diff mbox series

[1/1] hw/arm/sbsa-ref: Simplify init since PCIe is always enabled

Message ID 20240215153311.186772-1-marcin.juszkiewicz@linaro.org
State Superseded
Headers show
Series [1/1] hw/arm/sbsa-ref: Simplify init since PCIe is always enabled | expand

Commit Message

Marcin Juszkiewicz Feb. 15, 2024, 3:33 p.m. UTC
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 <marcin.juszkiewicz@linaro.org>
---
 hw/arm/sbsa-ref.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Philippe Mathieu-Daudé Feb. 15, 2024, 3:35 p.m. UTC | #1
On 15/2/24 16:33, Marcin Juszkiewicz wrote:
> 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 <marcin.juszkiewicz@linaro.org>
> ---
>   hw/arm/sbsa-ref.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Peter Maydell Feb. 22, 2024, 1:57 p.m. UTC | #2
On Thu, 15 Feb 2024 at 15:33, Marcin Juszkiewicz
<marcin.juszkiewicz@linaro.org> wrote:
>
> 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 <marcin.juszkiewicz@linaro.org>
> ---
>  hw/arm/sbsa-ref.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)



Applied to target-arm.next, thanks.

-- PMM
diff mbox series

Patch

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");