Skip to content

Commit

Permalink
mm/memblock.c: remove redundant assignment to variable max_addr
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Pankaj Gupta <[email protected]>
Reviewed-by: Mike Rapoport <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Addresses-Coverity: ("Unused value")
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Colin Ian King authored and torvalds committed Apr 2, 2020
1 parent aa9f7d5 commit 49aef71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/memblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 49aef71

Please sign in to comment.