Skip to contentSkip to conversation

fs/buffer: Remove the initialization of variables bh_{accounting, lrus}

PATCH New Kaitao Cheng 1 participant 1 message Apr 17, 2020 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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}.

---
 fs/buffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/buffer.c +2 -2
index 1b3d2e66c496..c13898b1e964 100644
@@ -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)
 {
Signature · 1 line
2.20.1