]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mm/memblock.c: remove redundant assignment to variable max_addr
authorColin Ian King <colin.king@canonical.com>
Thu, 2 Apr 2020 04:11:01 +0000 (21:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 2 Apr 2020 16:35:32 +0000 (09:35 -0700)
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 <colin.king@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Link: http://lkml.kernel.org/r/20200228235003.112718-1-colin.king@canonical.com
Addresses-Coverity: ("Unused value")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memblock.c

index eba94ee3de0b874ffa6f9c21752aaa7b9f7e6b8e..4d06bbaded0fd875183419f2c55b3b5bd18db7db 100644 (file)
@@ -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;