Skip to content

spapr: add drc->index, remove spapr_drc_index()

Daniel Henrique Barboza qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9hw/ppc/spapr_drc.c: add drc->indexhw/ppc/spapr_drc.c include/hw/ppc/spapr_drc.h+2 -00 replies
2/9hw/ppc/spapr_drc.c: redefine 'index' SpaprDRC propertyhw/ppc/spapr_drc.c+2 -100 replies
3/9hw/ppc/spapr_drc.c: use drc->index in trace functionshw/ppc/spapr_drc.c+13 -170 replies
4/9hw/ppc/spapr_drc.c: use drc->indexhw/ppc/spapr_drc.c+6 -90 replies
5/9hw/ppc/spapr.c: use drc->indexhw/ppc/spapr.c+8 -100 replies
6/9hw/ppc/spapr_events.c: use drc->indexhw/ppc/spapr_events.c+2 -20 replies
7/9hw/ppc/spapr_nvdimm.c: use drc->indexhw/ppc/spapr_nvdimm.c+4 -60 replies
8/9hw/ppc/spapr_pci.c: use drc->indexhw/ppc/spapr_pci.c+2 -30 replies
9/9hw/ppc/spapr_drc.c: remove spapr_drc_index()hw/ppc/spapr_drc.c include/hw/ppc/spapr_drc.h+10 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH for-7.1 0/9] spapr: add drc->index, remove spapr_drc_index()

Hi,

I decided to make this change after realizing that (1) spapr_drc_index() always return the same index value for the DRC regardless of machine or device state and (2) we call spapr_drc_index() a lot throughout the spapr code.

This means that a new attribute to store the generated index in the DRC object time will spare us from calling a function that always returns the same value.

No functional changes were made.

Daniel Henrique Barboza (9):
hw/ppc/spapr_drc.c: add drc->index hw/ppc/spapr_drc.c: redefine 'index' SpaprDRC property hw/ppc/spapr_drc.c: use drc->index in trace functions hw/ppc/spapr_drc.c: use drc->index hw/ppc/spapr.c: use drc->index hw/ppc/spapr_events.c: use drc->index hw/ppc/spapr_nvdimm.c: use drc->index hw/ppc/spapr_pci.c: use drc->index hw/ppc/spapr_drc.c: remove spapr_drc_index()

 hw/ppc/spapr.c             | 18 ++++-----
 hw/ppc/spapr_drc.c         | 79 +++++++++++++++-----------------------
 hw/ppc/spapr_events.c      |  4 +-
 hw/ppc/spapr_nvdimm.c      | 10 ++---
 hw/ppc/spapr_pci.c         |  5 +--
 include/hw/ppc/spapr_drc.h |  2 +-
 6 files changed, 48 insertions(+), 70 deletions(-)
Signature · 1 line
2.35.1