From mboxrd@z Thu Jan 1 00:00:00 1970 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 0C721C53210 for ; Thu, 5 Jan 2023 00:43:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240699AbjAEAm7 (ORCPT ); Wed, 4 Jan 2023 19:42:59 -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 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