From: Colin Ian King Date: Thu, 2 Apr 2020 04:11:01 +0000 (-0700) Subject: mm/memblock.c: remove redundant assignment to variable max_addr X-Git-Tag: v5.15~4178^2~17 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=49aef7175cc6eb703a9280a7b830e675fe8f2704;p=mirror_ubuntu-kernels.git mm/memblock.c: remove redundant assignment to variable max_addr The variable max_addr is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton Reviewed-by: Pankaj Gupta Reviewed-by: Mike Rapoport Link: http://lkml.kernel.org/r/20200228235003.112718-1-colin.king@canonical.com Addresses-Coverity: ("Unused value") Signed-off-by: Linus Torvalds --- diff --git a/mm/memblock.c b/mm/memblock.c index eba94ee3de0b..4d06bbaded0f 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -1698,7 +1698,7 @@ static phys_addr_t __init_memblock __find_max_addr(phys_addr_t limit) void __init memblock_enforce_memory_limit(phys_addr_t limit) { - phys_addr_t max_addr = PHYS_ADDR_MAX; + phys_addr_t max_addr; if (!limit) return;