From: Kushal Kothari <kushalkothari285@gmail.com>
To: rppt@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, mike.rapoport@gmail.com,
kushalkothari2850@gmail.com
Cc: Kushal Kothari <kushalkothari285@gmail.com>
Subject: [PATCH v2] mm: Fix ERROR:do not initialise statics to 0 or NULL in memblock.c
Date: Wed, 3 Nov 2021 18:15:23 +0530 [thread overview]
Message-ID: <20211103124523.10670-1-kushalkothari285@gmail.com> (raw)
The default value of static variable is zero and bool is false so
not need to set it here.
This patch fixes this ERROR in memblock.c
Error found with checkpatch.pl.
Signed-off-by: Kushal Kothari <kushalkothari285@gmail.com>
---
Changes in v2: Correct the subject line and remove <stdbool.h> which isn't
necessary
mm/memblock.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/memblock.c b/mm/memblock.c
index 5c3503c98b2f..9e2b7c1dbd03 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -152,10 +152,10 @@ static __refdata struct memblock_type *memblock_memory = &memblock.memory;
} while (0)
static int memblock_debug __initdata_memblock;
-static bool system_has_some_mirror __initdata_memblock = false;
+static bool system_has_some_mirror __initdata_memblock;
static int memblock_can_resize __initdata_memblock;
-static int memblock_memory_in_slab __initdata_memblock = 0;
-static int memblock_reserved_in_slab __initdata_memblock = 0;
+static int memblock_memory_in_slab __initdata_memblock;
+static int memblock_reserved_in_slab __initdata_memblock;
static enum memblock_flags __init_memblock choose_memblock_flags(void)
{
--
2.25.1
next reply other threads:[~2021-11-03 12:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-03 12:45 Kushal Kothari [this message]
2021-11-03 17:11 ` [PATCH v2] mm: Fix ERROR:do not initialise statics to 0 or NULL in memblock.c Mike Rapoport
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=20211103124523.10670-1-kushalkothari285@gmail.com \
--to=kushalkothari285@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kushalkothari2850@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.rapoport@gmail.com \
--cc=rppt@kernel.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).