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 4DB41C433F5 for ; Tue, 3 May 2022 10:01:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233979AbiECKEt (ORCPT ); Tue, 3 May 2022 06:04:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233933AbiECKEk (ORCPT ); Tue, 3 May 2022 06:04:40 -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 995D460CC for ; Tue, 3 May 2022 03:01:08 -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 C681A61519 for ; Tue, 3 May 2022 10:01:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23F23C385B3; Tue, 3 May 2022 10:01:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651572067; bh=ns1vdA0/qrQYg4Q4rjwNdkKJ1jBqx0nuAlBJgu/kcNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qgGdG5XmBbU8wwaFMrvp6wxXhQKeWEp5Xa8y95eouP6jxqTh5xPq32RuWZSM9LMQK 9VCmR1IZFNJ2muzPJmB8fCXmqCukeKYorhf/RlYChdt3CGAPoT06KJ+FJe19VaAo8m j4SHUTzpekdWVE1akkZmdefyZ7UH0uFvfRG39xIab/PN1Pe7dtuGT+JoaGZ8V5yRsJ pzLXZISM1/9HlwtbSS3ftwLnlY08rJPS6qaNyy+j2y9ScabVLfX7uPcaywedxYg9Ta pgGk/34BhoinRNM5eHpLhQPjrGWWUOxwtN243v12XvWPZ38eNt5nd71XJOM68Ye1B4 18PLocgvrkHhg== 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/21] context_tracking: Remove unused context_tracking_in_user() Date: Tue, 3 May 2022 12:00:31 +0200 Message-Id: <20220503100051.2799723-2-frederic@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220503100051.2799723-1-frederic@kernel.org> References: <20220503100051.2799723-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