Re: [PATCH 08/32] piix4: rename some variables in realize function

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

 



On 15/10/2019 18.26, Philippe Mathieu-Daudé wrote:
> From: Hervé Poussineau <hpoussin@xxxxxxxxxxx>
> 
> PIIX4 structure is now 's'
> PCI device is now 'pci_dev'
> DeviceState is now 'dev'

Why? Just for the sake of it?

> Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
> Acked-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> Signed-off-by: Hervé Poussineau <hpoussin@xxxxxxxxxxx>
> Message-Id: <20171216090228.28505-6-hpoussin@xxxxxxxxxxx>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
> ---
>  hw/isa/piix4.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
> index 3294056cd5..4202243e41 100644
> --- a/hw/isa/piix4.c
> +++ b/hw/isa/piix4.c
> @@ -88,16 +88,17 @@ static const VMStateDescription vmstate_piix4 = {
>      }
>  };
>  
> -static void piix4_realize(PCIDevice *dev, Error **errp)
> +static void piix4_realize(PCIDevice *pci_dev, Error **errp)
>  {
> -    PIIX4State *d = PIIX4_PCI_DEVICE(dev);
> +    DeviceState *dev = DEVICE(pci_dev);
> +    PIIX4State *s = DO_UPCAST(PIIX4State, dev, pci_dev);

AFAIK we rather want to get rid of DO_UPCAST in the long run, so please
don't introduce new ones!

See:
https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg05244.html

Unless there is a real need for the rename, I'd suggest to rather drop
this patch.

 Thomas



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux