From patchwork Wed Mar 22 18:54:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 73634 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2519118wrt; Wed, 22 Mar 2023 12:13:58 -0700 (PDT) X-Google-Smtp-Source: AK7set/IJiWm8pXeVNj+BHQlraQqBQmYH4p6tBOoYDFnihV82cgjRRAu/eKmFN535WwoOPLusXZq X-Received: by 2002:aa7:8f18:0:b0:627:effd:71ba with SMTP id x24-20020aa78f18000000b00627effd71bamr3804779pfr.6.1679512437899; Wed, 22 Mar 2023 12:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679512437; cv=none; d=google.com; s=arc-20160816; b=xxeuhXNMW5aFT8RrWADJIPYIl4DuE+Fip2mHg1Wxi/BM5T1b04MvxdDlGJnuMDZKYl rXL3Z8tYVebcXH79qiR/1q6fp5gq/U3CpBZPAppSp6fddApt1x7spEjStzVp6ma/7Uf4 MIH9JO7Sy6jbW97NE8ArMCYj7yGkkU05VhCfdIGhSA5i0D/3Rkj640HjgxVBi7f2Wa5y 2PIgctScXiF8MI7GeOrZLDXQOHwWHmsYinay3n3hUgxQvMQun+UUTsTqk6y3ukYdJ7My e83klqnCHiqnaVf3xZhsk8iu3RSSdlWjb0kidpe7K70fYzic+C3gOCtGS6MRnNd8waWQ TnLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=A+gI28LSL9lsNL+RXPBvchUT9Vk3rqUxL+KSWkY39mY=; b=m04JyqkixI/wa9Y+6peLksrUHMHeBWc+aaK9NBqD4RbePIUPuk07Eh6SzNETwMOmBI 2m2zCcddXMpPCZnbGNJQOWKwmqfjFz7ySMw+Zu+VP31ItGVTk81bRYYnQ8lX1Xlx4Quu QKtRyjWKdkMneRnJ+Aca4tkQqgtfUxphSlGMSaiZp5ezIOnrJHGzH107Xn2iWlszzIJr kECHOpD5J2NGlgYjUVl3ph2rvdfyr1IMRJJfpc4g8PxOBw6F93OSsO/buqfl4mCrsw1o vgov8KBTZGsI9uRRp4+ck0mRFvloUs2jhnSoRFyBBh6EtH2D8LiCaqNKkRxHxel6beI1 iMVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=L8doCyZX; dkim=neutral (no key) header.i=@linutronix.de header.b=WZC2rmjq; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j17-20020a63e751000000b00502d6decabesi16403263pgk.218.2023.03.22.12.13.45; Wed, 22 Mar 2023 12:13:57 -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=@linutronix.de header.s=2020 header.b=L8doCyZX; dkim=neutral (no key) header.i=@linutronix.de header.b=WZC2rmjq; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbjCVS4W (ORCPT + 99 others); Wed, 22 Mar 2023 14:56:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230174AbjCVS4D (ORCPT ); Wed, 22 Mar 2023 14:56:03 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC0846A043; Wed, 22 Mar 2023 11:54:26 -0700 (PDT) Date: Wed, 22 Mar 2023 18:54:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1679511252; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A+gI28LSL9lsNL+RXPBvchUT9Vk3rqUxL+KSWkY39mY=; b=L8doCyZXKwR2xK2krWvW71riO6Yy++aqCtMp/3InHJzmTcKZhMPKhXSmr8Uhjn8NKsuVCo dwQ6WzW8QGzrBe85YEBLBVKImWGzzNI7BsMF2JjPyKe+trr9F9v+K+2eCBtP143B1Phkh4 Q1L2w2cwxqojJoSItCY1qzWodpiVwKcKxMGLK8/NpPrwL0XqoeB3YE4tGU/KHrjje4xe57 ViaieZlYO6+GHShOaHXHg25z1+skH3X8bzFf4/SotHA7yttpVUS6qKwkniByYjD9+WoJe3 NlaXYf2mrUv2/a3Gn3KFAzpQJbz+SAsIPa28C+IhWouMkypj7dLXevv63caW8Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1679511252; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A+gI28LSL9lsNL+RXPBvchUT9Vk3rqUxL+KSWkY39mY=; b=WZC2rmjqWvhgpfjJnRYqQYYqth5IzjgxC/iHA4Vhtp+w3qVPgB1FHMI76YeWRpYgNyVfvk XI1knlV7H0N7JVDA== From: "tip-bot2 for Luis Chamberlain" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] x86: Simplify one-level sysctl registration for itmt_kern_table Cc: Luis Chamberlain , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <167951125144.5837.13563627492403972761.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761096433958207173?= X-GMAIL-MSGID: =?utf-8?q?1761096433958207173?= The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 89d7971eb2318595bc3b6ab7c5caede112c302ff Gitweb: https://git.kernel.org/tip/89d7971eb2318595bc3b6ab7c5caede112c302ff Author: Luis Chamberlain AuthorDate: Fri, 10 Mar 2023 15:32:48 -08:00 Committer: Dave Hansen CommitterDate: Wed, 22 Mar 2023 11:47:21 -07:00 x86: Simplify one-level sysctl registration for itmt_kern_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230310233248.3965389-3-mcgrof%40kernel.org --- arch/x86/kernel/itmt.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c index 9ff480e..670eb08 100644 --- a/arch/x86/kernel/itmt.c +++ b/arch/x86/kernel/itmt.c @@ -77,15 +77,6 @@ static struct ctl_table itmt_kern_table[] = { {} }; -static struct ctl_table itmt_root_table[] = { - { - .procname = "kernel", - .mode = 0555, - .child = itmt_kern_table, - }, - {} -}; - static struct ctl_table_header *itmt_sysctl_header; /** @@ -114,7 +105,7 @@ int sched_set_itmt_support(void) return 0; } - itmt_sysctl_header = register_sysctl_table(itmt_root_table); + itmt_sysctl_header = register_sysctl("kernel", itmt_kern_table); if (!itmt_sysctl_header) { mutex_unlock(&itmt_update_mutex); return -ENOMEM;