[PATCH 00/14] simple cleanups in spapr files

Daniel Henrique Barboza posted 14 patches 3 years, 11 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220228175004.8862-1-danielhb413@gmail.com
Maintainers: "Cédric Le Goater" <clg@kaod.org>, Daniel Henrique Barboza <danielhb413@gmail.com>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>
hw/ppc/spapr.c             | 31 +++++++++++--------------
hw/ppc/spapr_caps.c        | 22 +++++++-----------
hw/ppc/spapr_drc.c         | 47 ++++++++++++++------------------------
hw/ppc/spapr_numa.c        | 16 ++++++-------
hw/ppc/spapr_pci_nvlink2.c | 10 ++++----
hw/ppc/spapr_rtas.c        | 25 ++++++++++----------
hw/ppc/spapr_vio.c         |  6 ++---
7 files changed, 64 insertions(+), 93 deletions(-)
[PATCH 00/14] simple cleanups in spapr files
Posted by Daniel Henrique Barboza 3 years, 11 months ago
Hi,

These are some cleanups in spapr files I decided to make after seeing
Greg adding g_auto* in virtio-9p files.

I also took the opportunity to simplify the logic in some places where I
found it to be more complex than needed.

Aside from patch 02, no functional change was made in this series.

Daniel Henrique Barboza (14):
  hw/ppc/spapr.c: use g_autofree in spapr_dt_chosen()
  hw/ppc/spapr.c: fail early if no firmware found in machine_init()
  hw/ppc/spapr_caps.c: use g_autofree in spapr_cap_set_string()
  hw/ppc/spapr_caps.c: use g_autofree in spapr_cap_get_string()
  hw/ppc/spapr_caps.c: use g_autofree in spapr_caps_add_properties()
  hw/ppc/spapr_drc.c: use g_auto in spapr_dt_drc()
  hw/ppc/spapr_drc.c: use g_autofree in drc_realize()
  hw/ppc/spapr_drc.c: use g_autofree in drc_unrealize()
  hw/ppc/spapr_drc.c: use g_autofree in spapr_dr_connector_new()
  hw/ppc/spapr_drc.c: use g_autofree in spapr_drc_by_index()
  hw/ppc/spapr_numa.c: simplify spapr_numa_write_assoc_lookup_arrays()
  spapr_pci_nvlink2.c: use g_autofree in
    spapr_phb_nvgpu_ram_populate_dt()
  hw/ppc/spapr_rtas.c: use g_autofree in rtas_ibm_get_system_parameter()
  hw/ppc/spapr_vio.c: use g_autofree in spapr_dt_vdevice()

 hw/ppc/spapr.c             | 31 +++++++++++--------------
 hw/ppc/spapr_caps.c        | 22 +++++++-----------
 hw/ppc/spapr_drc.c         | 47 ++++++++++++++------------------------
 hw/ppc/spapr_numa.c        | 16 ++++++-------
 hw/ppc/spapr_pci_nvlink2.c | 10 ++++----
 hw/ppc/spapr_rtas.c        | 25 ++++++++++----------
 hw/ppc/spapr_vio.c         |  6 ++---
 7 files changed, 64 insertions(+), 93 deletions(-)

-- 
2.35.1
Re: [PATCH 00/14] simple cleanups in spapr files
Posted by Philippe Mathieu-Daudé 3 years, 11 months ago
On 28/2/22 18:49, Daniel Henrique Barboza wrote:
> Hi,
> 
> These are some cleanups in spapr files I decided to make after seeing
> Greg adding g_auto* in virtio-9p files.
> 
> I also took the opportunity to simplify the logic in some places where I
> found it to be more complex than needed.
> 
> Aside from patch 02, no functional change was made in this series.
> 
> Daniel Henrique Barboza (14):
>    hw/ppc/spapr.c: use g_autofree in spapr_dt_chosen()
>    hw/ppc/spapr.c: fail early if no firmware found in machine_init()
>    hw/ppc/spapr_caps.c: use g_autofree in spapr_cap_set_string()
>    hw/ppc/spapr_caps.c: use g_autofree in spapr_cap_get_string()
>    hw/ppc/spapr_caps.c: use g_autofree in spapr_caps_add_properties()
>    hw/ppc/spapr_drc.c: use g_auto in spapr_dt_drc()
>    hw/ppc/spapr_drc.c: use g_autofree in drc_realize()
>    hw/ppc/spapr_drc.c: use g_autofree in drc_unrealize()
>    hw/ppc/spapr_drc.c: use g_autofree in spapr_dr_connector_new()
>    hw/ppc/spapr_drc.c: use g_autofree in spapr_drc_by_index()
>    hw/ppc/spapr_numa.c: simplify spapr_numa_write_assoc_lookup_arrays()
>    spapr_pci_nvlink2.c: use g_autofree in
>      spapr_phb_nvgpu_ram_populate_dt()
>    hw/ppc/spapr_rtas.c: use g_autofree in rtas_ibm_get_system_parameter()
>    hw/ppc/spapr_vio.c: use g_autofree in spapr_dt_vdevice()

Series:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>