linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Gautam Menghani <gautammenghani201@gmail.com>, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: Remove unwanted initialization in vmemmap_populate_compound_pages()
Date: Mon, 13 Jun 2022 17:43:58 +0200	[thread overview]
Message-ID: <96894c79-1201-e8b8-a49d-b83ae4765f9d@redhat.com> (raw)
In-Reply-To: <20220612182320.160651-1-gautammenghani201@gmail.com>

On 12.06.22 20: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]
> 

Nit: s/unwanted/unnecessary/

Reviewed-by: David Hildenbrand <david@redhat.com>

> Signed-off-by: Gautam Menghani <gautammenghani201@gmail.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);


-- 
Thanks,

David / dhildenb



  parent reply	other threads:[~2022-06-13 15:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-12 18:23 [PATCH] mm: Remove unwanted initialization in vmemmap_populate_compound_pages() Gautam Menghani
2022-06-13  7:18 ` Muchun Song
2022-06-13 15:43 ` David Hildenbrand [this message]
2022-06-14 10:33 ` Joao Martins
2022-06-15  7:34 ` Oscar Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=96894c79-1201-e8b8-a49d-b83ae4765f9d@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=gautammenghani201@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).