diff options
author | Leonardo Bras <leonardo@linux.ibm.com> | 2019-08-02 10:39:15 -0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-11-13 16:58:10 +1100 |
commit | b948aaaf3e39cc475e45fea727638f191a5cb1b4 (patch) | |
tree | f227b5f9ea45be5c662351001ac362cca354e4d6 /arch/powerpc/platforms/pseries | |
parent | f5817191b0a3257d9963a574c53d085d9f443e7d (diff) | |
download | linux-b948aaaf3e39cc475e45fea727638f191a5cb1b4.tar.gz linux-b948aaaf3e39cc475e45fea727638f191a5cb1b4.tar.bz2 linux-b948aaaf3e39cc475e45fea727638f191a5cb1b4.zip |
powerpc/pseries/hotplug-memory: Change rc variable to bool
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>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190802133914.30413-1-leonardo@linux.ibm.com
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-memory.c | 6 |
1 files 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 *); |