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] [thread-next>] [day] [month] [year] [list]
Message-ID: <fdec491a-5dfd-6c9c-c961-18dcd9d0b3bb@oracle.com>
Date:   Tue, 14 Jun 2022 11:33:10 +0100
From:   Joao Martins <joao.m.martins@...cle.com>
To:     Gautam Menghani <gautammenghani201@...il.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        akpm@...ux-foundation.org
Subject: Re: [PATCH] mm: Remove unwanted initialization in
 vmemmap_populate_compound_pages()

On 6/12/22 19:23, Gautam Menghani wrote:
> Remove unwanted initialization for the variable 'next'. This fixes the
> clang scan warning: Value stored to 'next' during its initialization is 
> never read [deadcode.DeadStores]
> 
> Signed-off-by: Gautam Menghani <gautammenghani201@...il.com>

Ugh, thanks for catching that:

Reviewed-by: Joao Martins <joao.m.martins@...cle.com>

> ---
>  mm/sparse-vmemmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
> index f4fa61dbbee3..3008aa7859e0 100644
> --- a/mm/sparse-vmemmap.c
> +++ b/mm/sparse-vmemmap.c
> @@ -737,7 +737,7 @@ static int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn,
>  
>  	size = min(end - start, pgmap_vmemmap_nr(pgmap) * sizeof(struct page));
>  	for (addr = start; addr < end; addr += size) {
> -		unsigned long next = addr, last = addr + size;
> +		unsigned long next, last = addr + size;
>  
>  		/* Populate the head page vmemmap page */
>  		pte = vmemmap_populate_address(addr, node, NULL, NULL);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ