qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 9/9] hw/i386/pc_{piix, q35}: Eliminate local pci_bus/pci_host


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 9/9] hw/i386/pc_{piix, q35}: Eliminate local pci_bus/pci_host variables
Date: Wed, 21 Feb 2024 16:50:33 +0100
User-agent: Mozilla Thunderbird

On 8/2/24 23:03, Bernhard Beschow wrote:
There is no advantage in having these local variables which 1/ needlessly have
different identifiers in both machines and 2/ which are redundant to pcms->bus
which is almost as short.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
  hw/i386/pc_piix.c | 14 ++++++--------
  hw/i386/pc_q35.c  | 16 +++++++---------
  2 files changed, 13 insertions(+), 17 deletions(-)
IMO it is a design mistake to have these fields in PCMachineState:

 27 typedef struct PCMachineState {

 36     /* Pointers to devices and objects: */
 37     PCIBus *bus;
 38     I2CBus *smbus;
 39     PFlashCFI01 *flash[2];
 40     ISADevice *pcspk;
 41     DeviceState *iommu;
 42     BusState *idebus[MAX_IDE_BUS];

Anyhow, back to your patch, please rename 'bus' -> 'pcibus'. Maybe
in a preliminary patch?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]