Commit 831c4f3d authored by Markus Elfring's avatar Markus Elfring Committed by Max Filippov
Browse files

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Message-Id: <495c9f2e-7880-ee9a-5c61-eee598bb24c2@web.de>
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent 7d5bdc0c
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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();