Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp340373rwl; Thu, 23 Mar 2023 17:20:31 -0700 (PDT) X-Google-Smtp-Source: AKy350bbnm+gf5s4EgILdBpyUZuHyu4jO8wqiEd8PzGtyhySdoN+8Rn/Ta1wNaue1D4zJo22l3TT X-Received: by 2002:aa7:c65a:0:b0:501:c3de:dc5c with SMTP id z26-20020aa7c65a000000b00501c3dedc5cmr1192165edr.18.1679617231728; Thu, 23 Mar 2023 17:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679617231; cv=none; d=google.com; s=arc-20160816; b=K4Q0NEM7HNzme7pJgp7OUFyXngbcqfjeFTLXwCc3QYO9PuvnF1uYuuoBXhezzLOfOX DF9CRo25RjLJ0zjzF8zodptlWQDeJJ9WuuxZ99QI4tJcH6WtpYDiCaV2jj13ORRlSnvH O/MMFq7I4d21i6Yef8rkl1vZkm+iBVu96DDF2Bip0NVTpeCRio2ERfKSKGwTPCFncKzb lLhAkJQmlgfn57GhvI4zLLW30ul/HhHitRBf9sjqw4+p8GniDhRIwqwKE2lQ0DAhxF9C 6Jkn9AZFWNb6K6m46Zgf4QSS4yJyq0sR4spZvIac+3ZaE2C9WYy0K1DEnW4uTNq2sekA 1InQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vVEP0vQ/DN83w+OnorEHs0iEkvEk7Oh1zfOMFu6sTuo=; b=TioQahXIqXfEHVro91QJ35GOgCI/Pm5/y9aGQ2ivHaYDVppEN2oGMEy7/ryq3He87H 9sGwKcx4CCf7ESWkiwgSFOGqEi3IKgGNVPso5tKFAPCq+0kiTUe5qbwFuotQPQl8rnRx hBDv7Nj88n1EaIaKUsGkJALCqT2KU30lqpQcfRhyEzDAFgzQ34t7CjTfib7JFF57buV/ hUFCpp0siVa650So6RyuUctJC7aasdZ8Ydpd0ylS7EbFJff35LpI4mSH0ZM9NG7IAh7R LFeKY8faWzeux3UKEPgzcIhJwkti98R/cmVeiUk6Lg7GRr2+8om8GkIOoLT7YttrtDe2 VW/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WeG19BfY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz8-20020a170906cd0800b00928fca4e16csi15404564ejb.962.2023.03.23.17.20.06; Thu, 23 Mar 2023 17:20:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WeG19BfY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231137AbjCXATr (ORCPT + 99 others); Thu, 23 Mar 2023 20:19:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230506AbjCXATq (ORCPT ); Thu, 23 Mar 2023 20:19:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 001DC2D177; Thu, 23 Mar 2023 17:19:41 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 7679D628E3; Fri, 24 Mar 2023 00:19:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAE52C433EF; Fri, 24 Mar 2023 00:19:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679617180; bh=Dy5gUgxa2Ux36xNFueJhEIxHE/YNXOYB6Npc4f9H5Y8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WeG19BfYL7hBWzqROTU8ovzKbWMk1QCSR90fZ6CwvpocH07kIFC/amEUmPqIs8WkP JojEDVWNOLdSFnDOmq24IrBeFqr8UXorLQHSkCzLwR6lO18gdZI9E4VJSHjRwJwuoL +hNxwZVtbV+IujcutqCpgXwHBEDt2/uHpSaNCXnIEHDsLY6yTYIJgSxK5ZgnqcLM9Y /P+2dQXTb2dzgSzk4AOBjGAcTbC+9x+lk6qWmGpu2Mrgj5m2aCmaVxZfra/oHBAJdS LKqF5yztJokJdJSKVfctop1Xk3Zvlu6JjGJCQltdD7chkmCiInzVc0Qz2FRqdAVBQs Cqmf5lt3s7yRg== Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 891E21540379; Thu, 23 Mar 2023 17:19:40 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, hch@lst.de, "Paul E. McKenney" Subject: [PATCH RFC rcu 01/19] srcu: Add whitespace to __SRCU_STRUCT_INIT() & __DEFINE_SRCU() Date: Thu, 23 Mar 2023 17:19:20 -0700 Message-Id: <20230324001938.3443499-1-paulmck@kernel.org> X-Mailer: git-send-email 2.40.0.rc2 In-Reply-To: <3db82572-f156-4a5d-b711-841aa28bd996@paulmck-laptop> References: <3db82572-f156-4a5d-b711-841aa28bd996@paulmck-laptop> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a whitespace-only commit with no change in functionality. Its purpose is to prepare for later commits that: (1) Cause statically allocated srcu_struct structures to rely on compile-time initialization and (2) Move fields from the srcu_struct structure to a new srcu_usage structure. Signed-off-by: Paul E. McKenney Cc: Christoph Hellwig --- include/linux/srcutree.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h index a6910805f9c5..ac8af12f93b3 100644 --- a/include/linux/srcutree.h +++ b/include/linux/srcutree.h @@ -121,13 +121,13 @@ struct srcu_struct { #define SRCU_STATE_SCAN1 1 #define SRCU_STATE_SCAN2 2 -#define __SRCU_STRUCT_INIT(name, pcpu_name) \ -{ \ - .sda = &pcpu_name, \ - .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ - .srcu_gp_seq_needed = -1UL, \ - .work = __DELAYED_WORK_INITIALIZER(name.work, NULL, 0), \ - __SRCU_DEP_MAP_INIT(name) \ +#define __SRCU_STRUCT_INIT(name, pcpu_name) \ +{ \ + .sda = &pcpu_name, \ + .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ + .srcu_gp_seq_needed = -1UL, \ + .work = __DELAYED_WORK_INITIALIZER(name.work, NULL, 0), \ + __SRCU_DEP_MAP_INIT(name) \ } /* @@ -150,15 +150,15 @@ struct srcu_struct { * See include/linux/percpu-defs.h for the rules on per-CPU variables. */ #ifdef MODULE -# define __DEFINE_SRCU(name, is_static) \ - is_static struct srcu_struct name; \ - extern struct srcu_struct * const __srcu_struct_##name; \ - struct srcu_struct * const __srcu_struct_##name \ +# define __DEFINE_SRCU(name, is_static) \ + is_static struct srcu_struct name; \ + extern struct srcu_struct * const __srcu_struct_##name; \ + struct srcu_struct * const __srcu_struct_##name \ __section("___srcu_struct_ptrs") = &name #else -# define __DEFINE_SRCU(name, is_static) \ - static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \ - is_static struct srcu_struct name = \ +# define __DEFINE_SRCU(name, is_static) \ + static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \ + is_static struct srcu_struct name = \ __SRCU_STRUCT_INIT(name, name##_srcu_data) #endif #define DEFINE_SRCU(name) __DEFINE_SRCU(name, /* not static */) -- 2.40.0.rc2