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 6C60BC43334 for ; Wed, 8 Jun 2022 14:41:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241878AbiFHOlS (ORCPT ); Wed, 8 Jun 2022 10:41:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241705AbiFHOlE (ORCPT ); Wed, 8 Jun 2022 10:41:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CBA5157E83 for ; Wed, 8 Jun 2022 07:40:49 -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 864BF61B95 for ; Wed, 8 Jun 2022 14:40:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA7C7C341C8; Wed, 8 Jun 2022 14:40:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654699248; bh=ns1vdA0/qrQYg4Q4rjwNdkKJ1jBqx0nuAlBJgu/kcNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FftvwcczPCwlYEmoEN+HsJhaAgib1ISbeICzSUDzCi11ZeNCEfw6gIVs69DLI7JX9 Z1TBMDcv09De9frZ5eBu7PcNt/FRZyhwk18mbmb+4zKpRqxxTvlUA8P0tvaGa+4GB6 8/TRSz0A+Vae7JgK18uDyO7x1eiAS2r2sXVEmNF1anh7Ya6PsuB8Z2CrAYsw2x+VL2 jWkeYJd1jzDhhRXiFf5fa8Rc04b3fSWAmUW49KhytZvNFQ7ZlxEwf25moY7hNmhQ+Y WZ7dqDLU6TOXDybqxztnbh4mCIgZ99a3ahNFlvLvkjIfmBU34yRaONKuE+emFWigUE kCOQkxrf2LF+Q== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Peter Zijlstra , Phil Auld , Alex Belits , Nicolas Saenz Julienne , Xiongfeng Wang , Neeraj Upadhyay , Thomas Gleixner , Yu Liao , Boqun Feng , "Paul E . McKenney" , Marcelo Tosatti , Paul Gortmaker , Uladzislau Rezki , Joel Fernandes Subject: [PATCH 01/20] context_tracking: Remove unused context_tracking_in_user() Date: Wed, 8 Jun 2022 16:40:18 +0200 Message-Id: <20220608144037.1765000-2-frederic@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220608144037.1765000-1-frederic@kernel.org> References: <20220608144037.1765000-1-frederic@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: Paul E. McKenney 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 --- 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 65a60d3313b0..02be3ac2040d 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 inline bool context_tracking_in_user(void) { return false; } static inline bool context_tracking_enabled(void) { return false; } static inline bool context_tracking_enabled_cpu(int cpu) { return false; } static inline bool context_tracking_enabled_this_cpu(void) { return false; } -- 2.25.1