Commit b948aaaf authored by Leonardo Bras's avatar Leonardo Bras Committed by Michael Ellerman

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: default avatarLeonardo Bras <leonardo@linux.ibm.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190802133914.30413-1-leonardo@linux.ibm.com
parent f5817191
......@@ -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 *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment