Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp266133rwl; Thu, 30 Mar 2023 15:48:56 -0700 (PDT) X-Google-Smtp-Source: AKy350aSBGVMtz49iQ7S5fuNeWVq6E45bVBmAALmfjZUrloDdMHRrbViq+2sWcWasuwnVzY/ExCu X-Received: by 2002:a17:906:297:b0:932:170:e07b with SMTP id 23-20020a170906029700b009320170e07bmr2733842ejf.7.1680216536233; Thu, 30 Mar 2023 15:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680216536; cv=none; d=google.com; s=arc-20160816; b=QAp765AqCoBDNSI71MdnxYOrBZwPES7ZbKl/ZembBKir5dSs00JGF4ehC7Ok0WuP/L zS7R7nem/olRIQ0d1IDVMxcgpjuZNsVJPKv+bzxX+2nqhS292FK8VZduGC1zQnBR27DE xOFeyeSXSs6ucKFkVo8L2HT3XAbdFzgiXZEJKTfhynf2WO3HUnNDkRzON67npunWvkox iSHIp9nSWADkV1gcRNXxaO6/lJYmhaL0O7PbXqf3rLIwiAAz6rO4DNVLthveHkNc3PLc d6xDq/BVsBKJOhA3ICM40QQSl93ARUlvuTM5ZNomHd4SBvS5XbJPvqP5Mgq0eG2vybWp d3kw== 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=CG8Qaz4yoUOmXmNbxUpR28LSX4dZ5IZYQoxJXWpMNYQ=; b=lTmGtZyfJsWi8CMzEZpAp106Ysj94turcZz5XMFLvxZD4ZzjmgdhQ0ZsTsKBZBuA+U r7452FppdViwpw0O6uGASRao5KlYbun9noNDndqZlvvAsJtR3181zaFkr6CubIkK7lOl 9Cil/kd7bdF5laCXwV5RfOFACW4Co1yS2QUFsiry9HKXS/vZxS1j8N4L/bxpoz+6iZRF 5eMKaT6MTD9v8CNNKgJl0LSo/1eT3mbIT4oNSwWt5LANVGnXOWI0iLHGJPKe3i6fGEuH DI6+X5mAGbjRxOx+vnN2wmTyXJ6yJkY97Q0I4Zfbj0e3oAxGrMZ8c7Lxqv/3Fp7h99iq Vb+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gzb039to; 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 qn19-20020a170907211300b0092b93aded0csi524980ejb.149.2023.03.30.15.48.31; Thu, 30 Mar 2023 15:48:56 -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=gzb039to; 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 S230515AbjC3WsN (ORCPT + 99 others); Thu, 30 Mar 2023 18:48:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231199AbjC3Wry (ORCPT ); Thu, 30 Mar 2023 18:47:54 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 731F21205E; Thu, 30 Mar 2023 15:47:32 -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 A2C8EB82A5C; Thu, 30 Mar 2023 22:47:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5AFEFC433EF; Thu, 30 Mar 2023 22:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680216448; bh=K70gMvYhGvFQm2RTfPHGhx5QhVRNYr3RZRGehe7G6d8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gzb039to+vuZqj9zxtsNtJiv/Jsjbh/tlLhFhdaz59TRzIlvnTMqtwQGi/cv4d3j7 0SQqRgI/QC5DGAS8eL9CqG1G/0ZkA0Z/5DyaT4BEeZ6Omc2c1c0f6dvhtc3hexdSYX Shh4vZ4G8t4XAfhkml9ADN8A0FfnmfHYhEud1kVYTnxxU67OkHHkb50KtcydTpOhY+ fieZ49gHssFXVWCaHV0gPIr1ZjxUckCAto0HF0kYlUDcgcWi9y0p8ygakBLs7ME4qM 1cOS+jQ4nAUJcSuBCN19LJH9rz/b8ZL8FnIticHqKXgBbmOMi4C50YUbfz1nO4qJpz UCGsj7+uYdgwQ== Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id F1057154047E; Thu, 30 Mar 2023 15:47:27 -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" , Sachin Sant , "Zhang, Qiang1" Subject: [PATCH rcu 02/20] srcu: Add whitespace to __SRCU_STRUCT_INIT() & __DEFINE_SRCU() Date: Thu, 30 Mar 2023 15:47:08 -0700 Message-Id: <20230330224726.662344-2-paulmck@kernel.org> X-Mailer: git-send-email 2.40.0.rc2 In-Reply-To: References: 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. Cc: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Signed-off-by: Paul E. McKenney --- 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 558057b517b7..488d0e5d1ba3 100644 --- a/include/linux/srcutree.h +++ b/include/linux/srcutree.h @@ -108,13 +108,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) \ } /* @@ -137,15 +137,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