From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: qemu-devel@nongnu.org
Cc: Daniel Henrique Barboza <danielhb413@gmail.com>,
qemu-ppc@nongnu.org, clg@kaod.org, david@gibson.dropbear.id.au
Subject: [PATCH for-7.1 7/9] hw/ppc/spapr_nvdimm.c: use drc->index
Date: Fri, 18 Mar 2022 14:33:18 -0300 [thread overview]
Message-ID: <20220318173320.320541-8-danielhb413@gmail.com> (raw)
In-Reply-To: <20220318173320.320541-1-danielhb413@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
hw/ppc/spapr_nvdimm.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/hw/ppc/spapr_nvdimm.c b/hw/ppc/spapr_nvdimm.c
index c4c97da5de..5acb761220 100644
--- a/hw/ppc/spapr_nvdimm.c
+++ b/hw/ppc/spapr_nvdimm.c
@@ -145,7 +145,6 @@ static int spapr_dt_nvdimm(SpaprMachineState *spapr, void *fdt,
int child_offset;
char *buf;
SpaprDrc *drc;
- uint32_t drc_idx;
uint32_t node = object_property_get_uint(OBJECT(nvdimm), PC_DIMM_NODE_PROP,
&error_abort);
uint64_t slot = object_property_get_uint(OBJECT(nvdimm), PC_DIMM_SLOT_PROP,
@@ -157,15 +156,13 @@ static int spapr_dt_nvdimm(SpaprMachineState *spapr, void *fdt,
drc = spapr_drc_by_id(TYPE_SPAPR_DRC_PMEM, slot);
g_assert(drc);
- drc_idx = spapr_drc_index(drc);
-
- buf = g_strdup_printf("ibm,pmemory@%x", drc_idx);
+ buf = g_strdup_printf("ibm,pmemory@%x", drc->index);
child_offset = fdt_add_subnode(fdt, parent_offset, buf);
g_free(buf);
_FDT(child_offset);
- _FDT((fdt_setprop_cell(fdt, child_offset, "reg", drc_idx)));
+ _FDT((fdt_setprop_cell(fdt, child_offset, "reg", drc->index)));
_FDT((fdt_setprop_string(fdt, child_offset, "compatible", "ibm,pmemory")));
_FDT((fdt_setprop_string(fdt, child_offset, "device_type", "ibm,pmemory")));
@@ -175,7 +172,8 @@ static int spapr_dt_nvdimm(SpaprMachineState *spapr, void *fdt,
_FDT((fdt_setprop_string(fdt, child_offset, "ibm,unit-guid", buf)));
g_free(buf);
- _FDT((fdt_setprop_cell(fdt, child_offset, "ibm,my-drc-index", drc_idx)));
+ _FDT((fdt_setprop_cell(fdt, child_offset, "ibm,my-drc-index",
+ drc->index)));
_FDT((fdt_setprop_u64(fdt, child_offset, "ibm,block-size",
SPAPR_MINIMUM_SCM_BLOCK_SIZE)));
--
2.35.1
next prev parent reply other threads:[~2022-03-18 17:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 17:33 [PATCH for-7.1 0/9] spapr: add drc->index, remove spapr_drc_index() Daniel Henrique Barboza
2022-03-18 17:33 ` [PATCH for-7.1 1/9] hw/ppc/spapr_drc.c: add drc->index Daniel Henrique Barboza
2022-03-18 17:33 ` [PATCH for-7.1 2/9] hw/ppc/spapr_drc.c: redefine 'index' SpaprDRC property Daniel Henrique Barboza
2022-03-18 17:33 ` [PATCH for-7.1 3/9] hw/ppc/spapr_drc.c: use drc->index in trace functions Daniel Henrique Barboza
2022-03-18 17:33 ` [PATCH for-7.1 4/9] hw/ppc/spapr_drc.c: use drc->index Daniel Henrique Barboza
2022-03-18 17:33 ` [PATCH for-7.1 5/9] hw/ppc/spapr.c: " Daniel Henrique Barboza
2022-03-18 17:33 ` [PATCH for-7.1 6/9] hw/ppc/spapr_events.c: " Daniel Henrique Barboza
2022-03-18 17:33 ` Daniel Henrique Barboza [this message]
2022-03-18 17:33 ` [PATCH for-7.1 8/9] hw/ppc/spapr_pci.c: " Daniel Henrique Barboza
2022-03-18 17:33 ` [PATCH for-7.1 9/9] hw/ppc/spapr_drc.c: remove spapr_drc_index() Daniel Henrique Barboza
2022-03-21 3:55 ` [PATCH for-7.1 0/9] spapr: add drc->index, " David Gibson
2022-03-21 7:58 ` Daniel Henrique Barboza
2022-03-22 1:03 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220318173320.320541-8-danielhb413@gmail.com \
--to=danielhb413@gmail.com \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).