From: Li kunyu <kunyu@nfschina.com>
To: akpm@linux-foundation.org, linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, Li kunyu <kunyu@nfschina.com>
Subject: [PATCH] page_alloc: remove inactive initialization
Date: Wed, 3 Aug 2022 14:41:18 +0800 [thread overview]
Message-ID: <20220803064118.3664-1-kunyu@nfschina.com> (raw)
The allocation address of the table pointer variable is first performed
in the function, no initialization assignment is required, and no
invalid pointer will appear.
Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b0bcab50f0a3..38d559e8aee6 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -8885,7 +8885,7 @@ void *__init alloc_large_system_hash(const char *tablename,
{
unsigned long long max = high_limit;
unsigned long log2qty, size;
- void *table = NULL;
+ void *table;
gfp_t gfp_flags;
bool virt;
bool huge;
--
2.18.2
next reply other threads:[~2022-08-03 6:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-03 6:41 Li kunyu [this message]
2022-08-12 2:07 ` Li kunyu
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=20220803064118.3664-1-kunyu@nfschina.com \
--to=kunyu@nfschina.com \
--cc=akpm@linux-foundation.org \
--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