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-next>] [day] [month] [year] [list]
Date:   Wed,  3 Nov 2021 18:15:23 +0530
From:   Kushal Kothari <kushalkothari285@...il.com>
To:     rppt@...nel.org, akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, mike.rapoport@...il.com,
        kushalkothari2850@...il.com
Cc:     Kushal Kothari <kushalkothari285@...il.com>
Subject: [PATCH v2] mm: Fix ERROR:do not initialise statics to 0 or NULL in memblock.c

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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ