[PATCH 0/3] hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'

Philippe Mathieu-Daudé posted 3 patches 1 year, 2 months ago
hw/acpi/acpi-cpu-hotplug-stub.c |  8 +++---
hw/acpi/cpu_hotplug.c           | 46 ++++++++++++++++-----------------
hw/acpi/ich9.c                  |  9 ++++---
hw/acpi/piix4.c                 | 14 +++++-----
include/hw/acpi/cpu_hotplug.h   | 12 ++++-----
include/hw/acpi/ich9.h          |  2 +-
include/hw/acpi/piix4.h         |  2 +-
7 files changed, 47 insertions(+), 46 deletions(-)
[PATCH 0/3] hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'
Posted by Philippe Mathieu-Daudé 1 year, 2 months ago
To ease code review, rename ACPI CPU hotplug variables
to more meaningful names.

Since hotplug parent can't be any QOM object, and must be
a QDev, convert AcpiCpuHotplug::device from Object* to
DeviceState*.

Philippe Mathieu-Daudé (3):
  hw/acpi/cpu_hotplug: Rename gpe_cpu -> gpe
  hw/acpi/cpu_hotplug: Rename 'parent' MemoryRegion as 'container'
  hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'

 hw/acpi/acpi-cpu-hotplug-stub.c |  8 +++---
 hw/acpi/cpu_hotplug.c           | 46 ++++++++++++++++-----------------
 hw/acpi/ich9.c                  |  9 ++++---
 hw/acpi/piix4.c                 | 14 +++++-----
 include/hw/acpi/cpu_hotplug.h   | 12 ++++-----
 include/hw/acpi/ich9.h          |  2 +-
 include/hw/acpi/piix4.h         |  2 +-
 7 files changed, 47 insertions(+), 46 deletions(-)

-- 
2.38.1


Re: [PATCH 0/3] hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'
Posted by Philippe Mathieu-Daudé 1 year, 2 months ago
On 3/2/23 17:30, Philippe Mathieu-Daudé wrote:
> To ease code review, rename ACPI CPU hotplug variables
> to more meaningful names.
> 
> Since hotplug parent can't be any QOM object, and must be
> a QDev, convert AcpiCpuHotplug::device from Object* to
> DeviceState*.
> 
> Philippe Mathieu-Daudé (3):
>    hw/acpi/cpu_hotplug: Rename gpe_cpu -> gpe
>    hw/acpi/cpu_hotplug: Rename 'parent' MemoryRegion as 'container'
>    hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'

ping

Re: [PATCH 0/3] hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'
Posted by Philippe Mathieu-Daudé 1 year, 1 month ago
ping^2

On 22/2/23 22:34, Philippe Mathieu-Daudé wrote:
> On 3/2/23 17:30, Philippe Mathieu-Daudé wrote:
>> To ease code review, rename ACPI CPU hotplug variables
>> to more meaningful names.
>>
>> Since hotplug parent can't be any QOM object, and must be
>> a QDev, convert AcpiCpuHotplug::device from Object* to
>> DeviceState*.
>>
>> Philippe Mathieu-Daudé (3):
>>    hw/acpi/cpu_hotplug: Rename gpe_cpu -> gpe
>>    hw/acpi/cpu_hotplug: Rename 'parent' MemoryRegion as 'container'
>>    hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'
> 
> ping


Re: [PATCH 0/3] hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'
Posted by Igor Mammedov 1 year, 1 month ago
On Tue, 28 Feb 2023 14:36:43 +0100
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:

> ping^2

please use checkpatch before pasting series.

Object -> DeviceState is a nice cleanup,
the rest is just unnecessary churn in my opinion and a matter of taste,
but I fine with it if it makes code easier to read
for someone else.


> 
> On 22/2/23 22:34, Philippe Mathieu-Daudé wrote:
> > On 3/2/23 17:30, Philippe Mathieu-Daudé wrote:  
> >> To ease code review, rename ACPI CPU hotplug variables
> >> to more meaningful names.
> >>
> >> Since hotplug parent can't be any QOM object, and must be
> >> a QDev, convert AcpiCpuHotplug::device from Object* to
> >> DeviceState*.
> >>
> >> Philippe Mathieu-Daudé (3):
> >>    hw/acpi/cpu_hotplug: Rename gpe_cpu -> gpe
> >>    hw/acpi/cpu_hotplug: Rename 'parent' MemoryRegion as 'container'
> >>    hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'  
> > 
> > ping  
> 
Re: [PATCH 0/3] hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'
Posted by Michael S. Tsirkin 1 year, 1 month ago
On Tue, Feb 28, 2023 at 04:47:31PM +0100, Igor Mammedov wrote:
> On Tue, 28 Feb 2023 14:36:43 +0100
> Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 
> > ping^2
> 
> please use checkpatch before pasting series.
> 
> Object -> DeviceState is a nice cleanup,


I don't like that one either because everyone wants Object so
we just cast it back all the time. Let's carry what we use
if all you call sites cast you know you should keep the type you
cast to.


> the rest is just unnecessary churn in my opinion and a matter of taste,
> but I fine with it if it makes code easier to read
> for someone else.
> 
> 
> > 
> > On 22/2/23 22:34, Philippe Mathieu-Daudé wrote:
> > > On 3/2/23 17:30, Philippe Mathieu-Daudé wrote:  
> > >> To ease code review, rename ACPI CPU hotplug variables
> > >> to more meaningful names.
> > >>
> > >> Since hotplug parent can't be any QOM object, and must be
> > >> a QDev, convert AcpiCpuHotplug::device from Object* to
> > >> DeviceState*.
> > >>
> > >> Philippe Mathieu-Daudé (3):
> > >>    hw/acpi/cpu_hotplug: Rename gpe_cpu -> gpe
> > >>    hw/acpi/cpu_hotplug: Rename 'parent' MemoryRegion as 'container'
> > >>    hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'  
> > > 
> > > ping  
> >