From: Leonardo Bras <leonardo@linux.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: David Hildenbrand <david@redhat.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Pavel Tatashin <pavel.tatashin@microsoft.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Oscar Salvador <osalvador@suse.de>,
Nathan Fontenot <nfont@linux.vnet.ibm.com>,
Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>,
YueHaibing <yuehaibing@huawei.com>, Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v2 1/1] powerpc/pseries/hotplug-memory.c: Change rc variable to bool
Date: Thu, 19 Sep 2019 22:57:04 -0300 [thread overview]
Message-ID: <5aa1d16d90b3fc4a4aa989a4082f0e2fb776998a.camel@linux.ibm.com> (raw)
In-Reply-To: <dd417c2c-83f6-b3e0-0a87-25996af76db5@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1668 bytes --]
Hello Michael,
Any feedback on this patch?
Best regards,
On Fri, 2019-08-02 at 15:45 +0200, David Hildenbrand wrote:
> On 02.08.19 15:39, Leonardo Bras wrote:
> > Changes the return variable to bool (as the return value) and
> > avoids doing a ternary operation before returning.
> >
> > Signed-off-by: Leonardo Bras <leonardo@linux.ibm.com>
> > ---
> > Changes in v2:
> > - Restore previous and-ing logic on rc.
> >
> > arch/powerpc/platforms/pseries/hotplug-memory.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
> > index 8e700390f3d6..c126b94d1943 100644
> > --- a/arch/powerpc/platforms/pseries/hotplug-memory.c
> > +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
> > @@ -338,7 +338,7 @@ static int pseries_remove_mem_node(struct device_node *np)
> > static bool lmb_is_removable(struct drmem_lmb *lmb)
> > {
> > int i, scns_per_block;
> > - int rc = 1;
> > + bool rc = true;
> > unsigned long pfn, block_sz;
> > u64 phys_addr;
> >
> > @@ -363,11 +363,11 @@ static bool lmb_is_removable(struct drmem_lmb *lmb)
> > if (!pfn_present(pfn))
> > continue;
> >
> > - rc &= is_mem_section_removable(pfn, PAGES_PER_SECTION);
> > + rc = rc && is_mem_section_removable(pfn, PAGES_PER_SECTION);
> > phys_addr += MIN_MEMORY_BLOCK_SIZE;
> > }
> >
> > - return rc ? true : false;
> > + return rc;
> > }
> >
> > static int dlpar_add_lmb(struct drmem_lmb *);
> >
>
> Yeah, why not
>
> Reviewed-by: David Hildenbrand <david@redhat.com>
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-09-20 1:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-02 13:39 Leonardo Bras
2019-08-02 13:45 ` David Hildenbrand
2019-09-20 1:57 ` Leonardo Bras [this message]
2019-11-14 9:07 ` Michael Ellerman
2019-11-14 18:25 ` Leonardo Bras
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=5aa1d16d90b3fc4a4aa989a4082f0e2fb776998a.camel@linux.ibm.com \
--to=leonardo@linux.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=david@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=nfont@linux.vnet.ibm.com \
--cc=osalvador@suse.de \
--cc=paulus@samba.org \
--cc=pavel.tatashin@microsoft.com \
--cc=robh@kernel.org \
--cc=yuehaibing@huawei.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
Powered by JetHome