linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kaitao Cheng <pilgrimtao@gmail.com>
To: viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	songmuchun@bytedance.com, Kaitao Cheng <pilgrimtao@gmail.com>
Subject: [PATCH] fs/buffer: Remove the initialization of variables bh_{accounting, lrus}
Date: Sat, 18 Apr 2020 00:20:37 +0800	[thread overview]
Message-ID: <20200417162037.91546-1-pilgrimtao@gmail.com> (raw)

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


                 reply	other threads:[~2020-04-17 16:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200417162037.91546-1-pilgrimtao@gmail.com \
    --to=pilgrimtao@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=songmuchun@bytedance.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).