lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 1 Mar 2020 08:33:14 +0200
From:   Mike Rapoport <rppt@...ux.ibm.com>
To:     Colin King <colin.king@...onical.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/memblock: remove redundant assignment to variable
 max_addr

On Fri, Feb 28, 2020 at 11:50:03PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> 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.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

Reviewed-by: Mike Rapoport <rppt@...ux.ibm.com>

> ---
>  mm/memblock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;
> -- 
> 2.25.0
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ