From patchwork Fri Aug 4 06:41:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 130998 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:44a:b0:3f2:4152:657d with SMTP id ez10csp96289vqb; Fri, 4 Aug 2023 00:51:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGn6HZMUax20QEjEcwSWqt7AT/7gzi92Mqmh14qnqpKwZnVflxkaCCAdYgn3gvSW7/W0kBw X-Received: by 2002:a05:6358:4309:b0:132:cd75:1c0a with SMTP id r9-20020a056358430900b00132cd751c0amr991124rwc.2.1691135513469; Fri, 04 Aug 2023 00:51:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691135513; cv=none; d=google.com; s=arc-20160816; b=Fp0yxWBxFVpC5R8PH/yDFZI6rbgLl01b7ZhNNxo10+TGdtWnnFFN0SBywhYmtEwDxj mArMXYkENaz7gcUlxu8auQ4LYlEo6Cv3R3klNsVBv2b462JGOglKVBVeIrvwY7s59D2K vyq3BZFvN0JBdEbR0zf3XWYE9cZXcQ0O1SWfSOED8RB7FEYnONwSTBTC90wg0pEZFYks CoqBsh921QNVoS+pJ568rgtyB8wNs3JeCBaK+vDXwJW8jtI5W0mTY1dELsN6LoiSNOme OaYLbdCs5iTn7ayKkcoVi19h+1L6eV/Bv1H5vSFcdy32W3M4FNftcfOE5KIVONlK5Igr o+IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:lines:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=RpNXNF+UIf4k+VS+hWVeqHB+H9La6l0j/uGM7k8i4dA=; fh=rC2wqjYuRIz0tZK6d2FbNPqWfInPR2AQ11QbY0ArwYc=; b=ur27dpsUM7P8fCxQ6Us6lZ6nTX+UY+w/gSVpUYpa5lf0Ko9ljTum+1P41gbLCBZ4B3 y57W9zTUnLKTpCEEVQHW+VndZYECJ54x7FPN1Dz8RbfEcaUJHyvLHbwRV8tRbYPrZLIy aHCMQoYF+nrboNZnB8P/h2Jwug7GXm3vFMx0pYZ9Jmvvxfl+I6+Pl97UcZ/k6k/I5wkU 0J8mk04+gLB56o3l+Bds8iPPjL03JtGLxYEb3V06DLCn3JbE4SoRD3fAVFChcYu0Jb9i m6HcM0OBC/tttT4cFoViuzUsS3lVVrVeyYWZ8Eo+YWRqHeTWUg6a3gC20NYQPUW115El 0PPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ICMPzsl/"; 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=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o22-20020a635a16000000b005633492e104si1328906pgb.497.2023.08.04.00.51.39; Fri, 04 Aug 2023 00:51:53 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b="ICMPzsl/"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232654AbjHDGmJ (ORCPT + 99 others); Fri, 4 Aug 2023 02:42:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232530AbjHDGmF (ORCPT ); Fri, 4 Aug 2023 02:42:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F1E5E53 for ; Thu, 3 Aug 2023 23:42:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B1CF761F2D for ; Fri, 4 Aug 2023 06:42:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97793C433CA; Fri, 4 Aug 2023 06:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1691131323; bh=YE6JfkMkXl9XPK3NoaGgAgTqWqSUr2g18HujC+qBon0=; h=From:To:Cc:Subject:Date:From; b=ICMPzsl/Bl3lVEDraftSCIcOSIOzp+Zf5H2Kgdc/sgAf5auhi3g8BFfUIZDC+TfBD 8HgPTXSXO1yT2fb3WsrDf8Srz25hugqXyfZZwhLYOF3BauCQMHyU9ag9RQt5H5bTfV otYupeylYCbVTt++Dg2qVgZKPApajwkKf4QH7k4I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , John Stultz , "Peter Zijlstra (Intel)" , =?utf-8?q?Arve_Hj=C3=B8nne?= =?utf-8?q?v=C3=A5g?= , Valentin Schneider , Andrew Morton , "Christian Brauner (Microsoft)" , Mike Christie , Kees Cook , Nicholas Piggin , Zqiang , Prathu Baronia , Sami Tolvanen Subject: [PATCH] kthread: unexport __kthread_should_park() Date: Fri, 4 Aug 2023 08:41:51 +0200 Message-ID: <2023080450-handcuff-stump-1d6e@gregkh> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Lines: 52 X-Developer-Signature: v=1; a=openpgp-sha256; l=1946; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=YE6JfkMkXl9XPK3NoaGgAgTqWqSUr2g18HujC+qBon0=; b=owGbwMvMwCRo6H6F97bub03G02pJDCln5q4P5NPa5n5ul02d9qLWoqz2lTN2bnp6+dyXt4JTi ph+/hOS6YhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJ1OszLNiQIZS9VOKngd+/ 8ycOmUf6B70IXsuwYNOM1fu+9b2YYxdpXv6d9UvV07RF7wA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773284112052395119 X-GMAIL-MSGID: 1773284112052395119 There are no in-kernel users of __kthread_should_park() so mark it as static and do not export it. Cc: John Stultz Cc: "Peter Zijlstra (Intel)" Cc: "Arve Hjønnevåg" Cc: Valentin Schneider Cc: Andrew Morton Cc: "Christian Brauner (Microsoft)" Cc: Mike Christie Cc: Kees Cook Cc: Nicholas Piggin Cc: Zqiang Cc: Prathu Baronia Cc: Sami Tolvanen Signed-off-by: Greg Kroah-Hartman Reviewed-by: Kees Cook --- include/linux/kthread.h | 1 - kernel/kthread.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/kthread.h b/include/linux/kthread.h index f1f95a71a4bc..2c30ade43bc8 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h @@ -88,7 +88,6 @@ void kthread_bind_mask(struct task_struct *k, const struct cpumask *mask); int kthread_stop(struct task_struct *k); bool kthread_should_stop(void); bool kthread_should_park(void); -bool __kthread_should_park(struct task_struct *k); bool kthread_should_stop_or_park(void); bool kthread_freezable_should_stop(bool *was_frozen); void *kthread_func(struct task_struct *k); diff --git a/kernel/kthread.c b/kernel/kthread.c index 4fff7df17a68..1eea53050bab 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -159,11 +159,10 @@ bool kthread_should_stop(void) } EXPORT_SYMBOL(kthread_should_stop); -bool __kthread_should_park(struct task_struct *k) +static bool __kthread_should_park(struct task_struct *k) { return test_bit(KTHREAD_SHOULD_PARK, &to_kthread(k)->flags); } -EXPORT_SYMBOL_GPL(__kthread_should_park); /** * kthread_should_park - should this kthread park now?