From patchwork Mon Jun 20 23:10:09 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: 12888509 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 2CBECC43334 for ; Mon, 20 Jun 2022 23:12:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346649AbiFTXMK (ORCPT ); Mon, 20 Jun 2022 19:12:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346024AbiFTXLt (ORCPT ); Mon, 20 Jun 2022 19:11:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C4F62611C; Mon, 20 Jun 2022 16:10: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 dfw.source.kernel.org (Postfix) with ESMTPS id 3121B614FC; Mon, 20 Jun 2022 23:10:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8EBDBC3411B; Mon, 20 Jun 2022 23:10:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655766631; bh=exndd9a3xBM686KDgEhraoh1YVxjbXSDdpSHqgGxhoQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l7BeZAP4o1DL1v4+o1rtHvllFGM9RNht/gJ/P3dIICurJOIRYqIDxfITdkibDkv3S NuV9qSwE1MI/2L1uUQSxP4LoSbe5N4vcALefAKjYpptgAykvYNnNgBgdwjK8pk/VgR l1L8rGLhrF+9XsqM+xnbAjV87Didsqi3X1MAT3c6PqG1RuRe1voHb3yBF4MmZ1qyPZ 4Z2f/RYxytKwJBKly7kEwpJ9PtLYLj2PKfasRa3fx5gvrj5JpLZEYwu4StS2qenuyV rdNQN4JoM46k6hnz5N2x4w8VchDAztXbuuCG86WSz772ncLIrJXJ+NzkfDsCS+1DgG pgpqQhFvSB6+g== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 4FBF25C0A15; Mon, 20 Jun 2022 16:10:31 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, rostedt@goodmis.org, Frederic Weisbecker , Nicolas Saenz Julienne , Peter Zijlstra , Thomas Gleixner , Neeraj Upadhyay , Uladzislau Rezki , Joel Fernandes , Boqun Feng , Marcelo Tosatti , Xiongfeng Wang , Yu Liao , Phil Auld , Paul Gortmaker , Alex Belits , "Paul E . McKenney" Subject: [PATCH rcu 03/23] context_tracking: Remove unused context_tracking_in_user() Date: Mon, 20 Jun 2022 16:10:09 -0700 Message-Id: <20220620231029.3844583-3-paulmck@kernel.org> X-Mailer: git-send-email 2.31.1.189.g2e36527f23 In-Reply-To: <20220620231027.GA3844372@paulmck-ThinkPad-P17-Gen-1> References: <20220620231027.GA3844372@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: Frederic Weisbecker This function is not used and CT_WARN_ON() coupled with ct_state() is the preferred way to assert context tracking state values. Reported-by: Nicolas Saenz Julienne Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney --- include/linux/context_tracking_state.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index ae1e63e269474..edc7b46376a6b 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h @@ -41,12 +41,7 @@ static inline bool context_tracking_enabled_this_cpu(void) return context_tracking_enabled() && __this_cpu_read(context_tracking.active); } -static __always_inline bool context_tracking_in_user(void) -{ - return __this_cpu_read(context_tracking.state) == CONTEXT_USER; -} #else -static __always_inline bool context_tracking_in_user(void) { return false; } static __always_inline bool context_tracking_enabled(void) { return false; } static __always_inline bool context_tracking_enabled_cpu(int cpu) { return false; } static __always_inline bool context_tracking_enabled_this_cpu(void) { return false; }