Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp750494ybz; Fri, 17 Apr 2020 09:22:43 -0700 (PDT) X-Google-Smtp-Source: APiQypJZe7INZacbX252gwsWsahbGfnn9SBNZvZrB0q9opC+bro6mYstkpom+iRFMBWRPLYmYbc+ X-Received: by 2002:a17:906:1f47:: with SMTP id d7mr3888843ejk.37.1587140563800; Fri, 17 Apr 2020 09:22:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587140563; cv=none; d=google.com; s=arc-20160816; b=t+Otw+QYi52HzBpuq2MjtnMAXzVkc/dPyjdfr1u/M0/0HLfC6lHbVMS68DmzJWgfYC aq4O5b9ZaNfzVoGjONEBrZfgsrguRb4zogJ7fJwosUW64cxkijNz6MatsTFFGJoT1mhE ZFwtCn1FlxLQ6M3WET9+ISTc0rAOywrJBcik6MlxUUSlKTwLV/W0wvTb4TyKu54VBG/R HxsdlUqx6h9xOA8VWZOSmRvTsDaKJa/f1tc0U6CM1CBPfwqD1CdHbXEthGktTFv7U5lW VPjWNToyi+RTUHg9nIddIeHUY0qlKd/inCzaqCBKNjfvL05Oi/cKoJDRb9JaIGT3KBlq BUBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=uEC1NxgO3wDxKhGD+oHS7PoCQCoDC/4sznGP0BFL7YQ=; b=CAv4dmPMDy/pzj6vI86ZIGnVjERXx7hRIMDBKEmG5hRsVqX4sYjyMks09roHg5EVxq i2QR++O9MWMYfnMpdzvRHISc55baIG8e/VR53G0MiyCJ7snqvdSsG6rvhYyw/rHZaIbF inh0lsRPgfp9gklEikOE+8yADvZ5yHeSBL55AvyQDuc0mZJWq3yojgm8FAUozzmyGSqA DAYoGCKhj9laiKMUzf9k9Fo3cCuq5KrsiM9CeLV2dwmwMay7wHwpAYnPzmsQm1E9WCV+ gGMbzwUKoW9DRlLVKlgJs+5kjzqe8jM9fwybcUyC5h6noQWX7r930bfSfm3qlXgUSqeZ 7wjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=J5rQiyqw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si16664496edc.18.2020.04.17.09.22.17; Fri, 17 Apr 2020 09:22:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=J5rQiyqw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730237AbgDQQUr (ORCPT + 99 others); Fri, 17 Apr 2020 12:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729581AbgDQQUq (ORCPT ); Fri, 17 Apr 2020 12:20:46 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 610BEC061A0C; Fri, 17 Apr 2020 09:20:46 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id y25so1279900pfn.5; Fri, 17 Apr 2020 09:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uEC1NxgO3wDxKhGD+oHS7PoCQCoDC/4sznGP0BFL7YQ=; b=J5rQiyqwo/AipGRK7qskSONOpPidp/DsEQxq00hgiAwSXPh1pBxheO5mdSsW1lwZ4a GFzUj1JEpdEAaSpxk22bXhnNCzeJ/aLB+xiXFaYXMqxq2UaX5xy5W/f3BwG/+XDK3FtC mW24yMH/2NMQI9lLx9+/O3vSSqCRB+/U1NEyYxlcRWJAsbkGWXYqJ8roMmoCaeS/Pz0q VDPALjTcz6QgpcriDH6yXo44w+sflCEsL/CYxbj3c9E6E2/aaNi5+J8HCaPUnLI2VrUg dq0VqMNfoytaHJvzn19owbq9UN6gEEQ/Hv9nBzzonOTGNklKnU6XEM0A1diU7b0z8oTy 41Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uEC1NxgO3wDxKhGD+oHS7PoCQCoDC/4sznGP0BFL7YQ=; b=swWPWJUoldnCYiNrTmb4HoxMB5eInvOOxOzzHEfOmUDRFS0YgvyEao+jvbTcddnG+6 1M5M8/dpWTx2+px3fupJX/97L30/NJfyHwOE+TQ8/goXr9eG1u1uKKvmrh3ExIgsD/ON qxww8DS7X/Q0QCKJndV2OLVYCbfMsZp3tZLPzu05Na/SZpplBFUrkf8Fru/EP548+/fb aHD+XlHEqW7y7tz/hodJGCfLhjNyKRit5mcWpvrKqREXz/V8GLoc9hVgrXwQ6nIn3ofo Jb7L9EtUeZO07rHnPxdExj1Mel7UqYxKAcCG4bWjhT7V8kpatYWvBhN67rAP9IDZ0kpB Xagw== X-Gm-Message-State: AGi0PuYEPPMx5sum+BlasHDG2vzVxwY8/Ra3ZVIPI956k6oPxHccMPn3 Pa0tF9GQ2OaymJYLDIQbYMo= X-Received: by 2002:a62:5b87:: with SMTP id p129mr3892027pfb.5.1587140445832; Fri, 17 Apr 2020 09:20:45 -0700 (PDT) Received: from Smcdef-MBP.lan ([103.136.220.73]) by smtp.gmail.com with ESMTPSA id i8sm17611763pgr.82.2020.04.17.09.20.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2020 09:20:45 -0700 (PDT) From: Kaitao Cheng To: viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, songmuchun@bytedance.com, Kaitao Cheng Subject: [PATCH] fs/buffer: Remove the initialization of variables bh_{accounting, lrus} Date: Sat, 18 Apr 2020 00:20:37 +0800 Message-Id: <20200417162037.91546-1-pilgrimtao@gmail.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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