From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
Michael Bringmann <mwb@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>,
Juliet Kim <minkim@us.ibm.com>,
Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Subject: Re: [PATCH v06 3/5] migration/memory: Add hotplug READD_MULTIPLE
Date: Tue, 16 Oct 2018 12:57:20 -0700 [thread overview]
Message-ID: <80494db2-6a01-059f-890c-df7c410714f7@linux.vnet.ibm.com> (raw)
In-Reply-To: <87sh16lo72.fsf@concordia.ellerman.id.au>
On 10/15/2018 05:39 PM, Michael Ellerman wrote:
> Michael Bringmann <mwb@linux.vnet.ibm.com> writes:
>> diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
>> index 2b796da..9c76345 100644
>> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c
>> +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
>> @@ -541,6 +549,23 @@ static int dlpar_memory_readd_by_index(u32 drc_index)
>> return rc;
>> }
>>
>> +static int dlpar_memory_readd_multiple(void)
>> +{
>> + struct drmem_lmb *lmb;
>> + int rc;
>> +
>> + pr_info("Attempting to update multiple LMBs\n");
>> +
>> + for_each_drmem_lmb(lmb) {
>> + if (drmem_lmb_update(lmb)) {
>> + rc = dlpar_memory_readd_helper(lmb);
>> + drmem_remove_lmb_update(lmb);
>> + }
>> + }
>> +
>> + return rc;
>> +}
>
> This leaves rc potentially uninitialised.
>
> What should the result be in that case, -EINVAL ?
On another note if there are multiple LMBs to update the value of rc only reflects the final dlpar_memory_readd_helper() call.
-Tyrel
>
> cheers
>
next prev parent reply other threads:[~2018-10-16 19:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181015194738.5705.88953.stgit@ltcalpine2-lp9.aus.stglabs.ibm.com>
2018-10-15 19:53 ` [PATCH v06 3/5] migration/memory: Add hotplug READD_MULTIPLE Michael Bringmann
2018-10-16 0:39 ` Michael Ellerman
2018-10-16 14:07 ` Michael Bringmann
2018-10-16 19:57 ` Tyrel Datwyler [this message]
2018-10-16 21:31 ` Michael Bringmann
2018-10-17 0:48 ` Michael Ellerman
2018-10-17 15:12 ` Michael Bringmann
2018-10-17 0:43 ` Michael Ellerman
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=80494db2-6a01-059f-890c-df7c410714f7@linux.vnet.ibm.com \
--to=tyreld@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=minkim@us.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=mwb@linux.vnet.ibm.com \
--cc=nfont@linux.vnet.ibm.com \
--cc=tlfalcon@linux.vnet.ibm.com \
/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).