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>] [day] [month] [year] [list]
Message-Id: <20200417162037.91546-1-pilgrimtao@gmail.com>
Date:   Sat, 18 Apr 2020 00:20:37 +0800
From:   Kaitao Cheng <pilgrimtao@...il.com>
To:     viro@...iv.linux.org.uk
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        songmuchun@...edance.com, Kaitao Cheng <pilgrimtao@...il.com>
Subject: [PATCH] fs/buffer: Remove the initialization of variables bh_{accounting, lrus}

The static global variables will be automatically initialized to 0,
and we do not need to manually initialize to 0. So remove the
initialization of variable bh_{accounting, lrus}.

Signed-off-by: Kaitao Cheng <pilgrimtao@...il.com>
---
 fs/buffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index 1b3d2e66c496..c13898b1e964 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1274,7 +1274,7 @@ struct bh_lru {
 	struct buffer_head *bhs[BH_LRU_SIZE];
 };
 
-static DEFINE_PER_CPU(struct bh_lru, bh_lrus) = {{ NULL }};
+static DEFINE_PER_CPU(struct bh_lru, bh_lrus);
 
 #ifdef CONFIG_SMP
 #define bh_lru_lock()	local_irq_disable()
@@ -3368,7 +3368,7 @@ struct bh_accounting {
 	int ratelimit;		/* Limit cacheline bouncing */
 };
 
-static DEFINE_PER_CPU(struct bh_accounting, bh_accounting) = {0, 0};
+static DEFINE_PER_CPU(struct bh_accounting, bh_accounting);
 
 static void recalc_bh_state(void)
 {
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ