From: Markus Elfring Date: Fri, 5 Jul 2019 16:33:58 +0000 (+0200) Subject: xtensa: One function call less in bootmem_init() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=831c4f3da83e260df943dfb982d77cef5cba2c49;p=openwrt%2Fstaging%2Fblogic.git xtensa: One function call less in bootmem_init() Avoid an extra function call by using a ternary operator instead of a conditional statement for a setting selection. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Message-Id: <495c9f2e-7880-ee9a-5c61-eee598bb24c2@web.de> Signed-off-by: Max Filippov --- diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index b51746f2b80b..79467c749416 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c @@ -45,10 +45,7 @@ void __init bootmem_init(void) * If PHYS_OFFSET is zero reserve page at address 0: * successfull allocations should never return NULL. */ - if (PHYS_OFFSET) - memblock_reserve(0, PHYS_OFFSET); - else - memblock_reserve(0, 1); + memblock_reserve(0, PHYS_OFFSET ? PHYS_OFFSET : 1); early_init_fdt_scan_reserved_mem();