From: Joao Martins <joao.m.martins@oracle.com>
To: Gautam Menghani <gautammenghani201@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org
Subject: Re: [PATCH] mm: Remove unwanted initialization in vmemmap_populate_compound_pages()
Date: Tue, 14 Jun 2022 11:33:10 +0100 [thread overview]
Message-ID: <fdec491a-5dfd-6c9c-c961-18dcd9d0b3bb@oracle.com> (raw)
In-Reply-To: <20220612182320.160651-1-gautammenghani201@gmail.com>
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@gmail.com>
Ugh, thanks for catching that:
Reviewed-by: Joao Martins <joao.m.martins@oracle.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);
next prev parent reply other threads:[~2022-06-14 10:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-12 18:23 Gautam Menghani
2022-06-13 7:18 ` Muchun Song
2022-06-13 15:43 ` David Hildenbrand
2022-06-14 10:33 ` Joao Martins [this message]
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=fdec491a-5dfd-6c9c-c961-18dcd9d0b3bb@oracle.com \
--to=joao.m.martins@oracle.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