Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp155737rwl; Wed, 4 Jan 2023 16:56:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXsa719JDzcd99BxiRI/dvfIVyOjR7G373cLty2UuQCiTP8AIu/ED+POawIkg1RQngiuSmsr X-Received: by 2002:a17:90a:540a:b0:219:9da5:40d3 with SMTP id z10-20020a17090a540a00b002199da540d3mr51786614pjh.1.1672880214160; Wed, 04 Jan 2023 16:56:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672880214; cv=none; d=google.com; s=arc-20160816; b=ifl9tpbyiBHxVcbMfOyDTFtqqZaJW4BdlelYxuqqI5UmyyTnkCww8RJIlFZVcOWZmJ 9j7fkjb5WrXIbRMtg+9dwuclv0L6Xdn9isDZe6/aBH9BvVb0kYtlX4SP9EbgmxnMiwnk 2v0qQk/d2BRRkOwgkoyg4dIFlLzC92Zmd3KZT6PunM7IYYXWSvZq7A8Ulv8v+kTJGGCt sOAITYP5orOkRVsomzqslofWGm6OTG9mUqkj7WRHbtGz674yuz34v7Y62IQFlL0Wtq+0 bRYGRDTnnfMbRxAMY9AVm2zivkggEsAw+MD7h2Xe20NQXapGZzt7aICWt9YOBO33jxYg 5N0Q== 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=i5GhLZAdkQHSHKkgRG0iGY/dFpZc/h6JLOSGbID2yzg=; b=ArxDCrjBYxqEQXrUTGpzPe+nvNd1XWvL8gqXXLJagmmrLr1ojC8b3LWIkcVtEKNXqY uB/E0DfEdWF95AnnIEZqAIekRYPxQ+6BBFtrNMHzseta/4uIC62bFhqKKFItsqpK+Ig5 ybyryNETgL10YCJEY637D3B8mbSSbpVCSTtqOsJh3ShShCGXpqVh8yBjE5Il6cZ0nj8H 8mzlla7h4hTjHZ46S2l0fz+dMwnCTRSnw0rFwN+rqer461YlqDFzK+oBy6bAEPbMi5aT ylxuiAO03t9qkgzT3OJK9oInR/XkQVo5tHgojdxVFYUJzAesYp/sE7oCKotrmQ1kiX7L foow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GbBLL0A1; 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 nl9-20020a17090b384900b00218cf92fc62si506126pjb.89.2023.01.04.16.56.47; Wed, 04 Jan 2023 16:56:54 -0800 (PST) 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=GbBLL0A1; 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 S240697AbjAEAm5 (ORCPT + 56 others); Wed, 4 Jan 2023 19:42:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240689AbjAEAir (ORCPT ); Wed, 4 Jan 2023 19:38:47 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F564C1C; Wed, 4 Jan 2023 16:38:19 -0800 (PST) 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 427646189B; Thu, 5 Jan 2023 00:38:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69658C433A1; Thu, 5 Jan 2023 00:38:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672879095; bh=VZ0XP9k+B6JCpAEaJUc1YvhjSIE4GvrohuwFSYSkxhs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GbBLL0A17D0Y2kEN6kXZlb0uETWfWcNbPl31YmyHcTg7LrkHkY+4QYqqcMd7eQWon o/eR9irHCWd3e6E3obV4mRG7qyZWUlweebcGQgVi8fmIOyJouv8nrMKWXSxe5mca7a l3sGIi1U4nntsVT9Fj7T3aUWNbbYlJbYlz8kSB8nBijG48Pk52t817A86TuD1D5jBz T0fk+WBYZShqT0RwcjnnYvVKn+jpwRybN8M2eG2w9UvbE1FMT5dcP4nF7TQvg9ERtn NUF89Azim2HUn8okXF2ckTFM8b25R9Z8qVhE1kFTPXB2e2X6JjHeTQh0WzgVBax7YW 9KjGIroP+FxVQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id C3DB65C1C5B; Wed, 4 Jan 2023 16:38:14 -0800 (PST) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, "Paul E. McKenney" , Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: [PATCH rcu 08/27] drivers/base: Remove CONFIG_SRCU Date: Wed, 4 Jan 2023 16:37:54 -0800 Message-Id: <20230105003813.1770367-8-paulmck@kernel.org> X-Mailer: git-send-email 2.31.1.189.g2e36527f23 In-Reply-To: <20230105003759.GA1769545@paulmck-ThinkPad-P17-Gen-1> References: <20230105003759.GA1769545@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Now that the SRCU Kconfig option is unconditionally selected, there is no longer any point in conditional compilation based on CONFIG_SRCU. Therefore, remove the #ifdef and throw away the #else clause. Signed-off-by: Paul E. McKenney Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" --- drivers/base/core.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index a3e14143ec0cf..bb36aca8d1b7a 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -181,7 +181,6 @@ void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode) } EXPORT_SYMBOL_GPL(fw_devlink_purge_absent_suppliers); -#ifdef CONFIG_SRCU static DEFINE_MUTEX(device_links_lock); DEFINE_STATIC_SRCU(device_links_srcu); @@ -220,47 +219,6 @@ static void device_link_remove_from_lists(struct device_link *link) list_del_rcu(&link->s_node); list_del_rcu(&link->c_node); } -#else /* !CONFIG_SRCU */ -static DECLARE_RWSEM(device_links_lock); - -static inline void device_links_write_lock(void) -{ - down_write(&device_links_lock); -} - -static inline void device_links_write_unlock(void) -{ - up_write(&device_links_lock); -} - -int device_links_read_lock(void) -{ - down_read(&device_links_lock); - return 0; -} - -void device_links_read_unlock(int not_used) -{ - up_read(&device_links_lock); -} - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -int device_links_read_lock_held(void) -{ - return lockdep_is_held(&device_links_lock); -} -#endif - -static inline void device_link_synchronize_removal(void) -{ -} - -static void device_link_remove_from_lists(struct device_link *link) -{ - list_del(&link->s_node); - list_del(&link->c_node); -} -#endif /* !CONFIG_SRCU */ static bool device_is_ancestor(struct device *dev, struct device *target) { -- 2.31.1.189.g2e36527f23