aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2019-07-05 12:33:58 -0400
committerMax Filippov <jcmvbkbc@gmail.com>2019-07-05 15:02:37 -0400
commit831c4f3da83e260df943dfb982d77cef5cba2c49 (patch)
tree2d2df97b5fb0a4cb78f9a6610e68bc9495f45e33
parent7d5bdc0cf24f423b37dd4e5591924d088d0f34a9 (diff)
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 <elfring@users.sourceforge.net> Message-Id: <495c9f2e-7880-ee9a-5c61-eee598bb24c2@web.de> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
-rw-r--r--arch/xtensa/mm/init.c5
1 files changed, 1 insertions, 4 deletions
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)
45 * If PHYS_OFFSET is zero reserve page at address 0: 45 * If PHYS_OFFSET is zero reserve page at address 0:
46 * successfull allocations should never return NULL. 46 * successfull allocations should never return NULL.
47 */ 47 */
48 if (PHYS_OFFSET) 48 memblock_reserve(0, PHYS_OFFSET ? PHYS_OFFSET : 1);
49 memblock_reserve(0, PHYS_OFFSET);
50 else
51 memblock_reserve(0, 1);
52 49
53 early_init_fdt_scan_reserved_mem(); 50 early_init_fdt_scan_reserved_mem();
54 51