From patchwork Mon Jun 20 22:20:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 12888333 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 453DBCCA480 for ; Mon, 20 Jun 2022 22:20:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343796AbiFTWUx (ORCPT ); Mon, 20 Jun 2022 18:20:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244552AbiFTWUm (ORCPT ); Mon, 20 Jun 2022 18:20:42 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF86F1BE83; Mon, 20 Jun 2022 15:20:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3414EB8164F; Mon, 20 Jun 2022 22:20:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A044BC385A5; Mon, 20 Jun 2022 22:20:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655763634; bh=omFpL6AjD/2c4cDtQPge8eB3hsr4UIqIh5fcwI+Snkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L2aeUhfRA6yU94xu33SIBxrDD57PJ6/AHIPrCffkBFV5gVousgGB1b846unb/VpRy cMQP65ZV6scdrQ6TLcRXTdFEpb0GDzoUiMiwtP0n4FOTFknI0+spFUYlZ2gjbEB2Af TlPELayCfcl8at4ZRGrAN/4BGwnFhI/75T7Zuz5auaP/eWZTdIFnG+grDhBMwKOLqU kL3eHj6slDghDWmoJ+eCVddp9c/3E+Yj+KWjM7OGXBN6ZVprlz0IRHl8/D/XGyBFz6 gl4AtLRBC6uFPyDovbpFpr43bVu6b39hiOaU517jCenTcgiLJPiHwtRGRV/MiTo0M1 MROJ5LXCvK+zQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 0E8F25C0DAC; Mon, 20 Jun 2022 15:20:34 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, rostedt@goodmis.org, "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay Subject: [PATCH rcu 10/12] rcu: Initialize first_gp_fqs at declaration in rcu_gp_fqs() Date: Mon, 20 Jun 2022 15:20:30 -0700 Message-Id: <20220620222032.3839547-10-paulmck@kernel.org> X-Mailer: git-send-email 2.31.1.189.g2e36527f23 In-Reply-To: <20220620222022.GA3839466@paulmck-ThinkPad-P17-Gen-1> References: <20220620222022.GA3839466@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org This commit saves a line of code by initializing the rcu_gp_fqs() function's first_gp_fqs local variable in its declaration. Reported-by: Frederic Weisbecker Reported-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 7919d7b48fa6a..7d8e9cb852786 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -1971,13 +1971,12 @@ static void rcu_gp_fqs(bool first_time) */ static noinline_for_stack void rcu_gp_fqs_loop(void) { - bool first_gp_fqs; + bool first_gp_fqs = true; int gf = 0; unsigned long j; int ret; struct rcu_node *rnp = rcu_get_root(); - first_gp_fqs = true; j = READ_ONCE(jiffies_till_first_fqs); if (rcu_state.cbovld) gf = RCU_GP_FLAG_OVLD;