Message ID | f06e810735c49a611e7dc75715f0689b5f7e87c6.1670153931.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1759037wrr; Sun, 4 Dec 2022 04:08:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf7k6HABGeUE58ClrFiAJ9WF53mbDOmzjLZhGPSj/279KysSpJVYrRUNAwby7agObbkwp6E9 X-Received: by 2002:a17:90b:4016:b0:219:4f54:34e6 with SMTP id ie22-20020a17090b401600b002194f5434e6mr28346681pjb.208.1670155703027; Sun, 04 Dec 2022 04:08:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670155703; cv=none; d=google.com; s=arc-20160816; b=VEcZrB9bXmoOpODOG8mkrPYuM++faoWfsmhhMjZd9/dX3VPTjEO4LOJ0eSm8W1+x9u WSkjUcfPx2m17Nmu4H7HjdP+YVxkX5mLbPbrjAFhUX9sSrcf6cCVc1Vgd7NHPweTjGdH T1+6MV/EgtpdoKyR2sbsT+ATgQoBh8kgjNHHQo6Cv12QoUX++50GDE1uUxKejdwYNnjI f5+hXjI82Qfq5ymzyemKlb6bvE8kZ48OIdIapumR0QpARlizOgx+CE8GuDxwN2CHADkC SjtOgZFcm8ykug1U23PWHYvlJT4dHHvliOHnkJLjqw1MVDTWOpVMauDJju+ezcVtGKfN fVEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=t+a53L2arVwwko/tlQvhz6oFJh+e2ROeLOkFmKSamn0=; b=frihWi8JNZCFNIxGaGAqssIeDy/jjmCOH2y9aib+p5wfNa8kt6lkU9Mgd4GJBn9W1U z+qkoNMNdVWG6uI7a95vrze1pSvfA+yb0m35NtqHqYCuk+8WU1zzd+vu4rtrTHl86Chd pbWUAasyXItKpJLqUAy/BEOZx0lsfd7D2d/e5jtxa6YG6MM/N4NHkau4OJv614bzeH0l Ub2d624BspBAHXDziEgR3jqNl2WOvGmBJr1tLzl/GXRjgjL1zN1m/d5k1922r9LQUqWz 1qjpumBm5xZX2pwz/wTQHOta8/nbi/kvIeHsASnvM2S8/Mhqiy6XEb+J5oDlrRa6sCny hZPw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c13-20020a170903234d00b0017a0a6b5b11si13547982plh.145.2022.12.04.04.07.50; Sun, 04 Dec 2022 04:08:23 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229995AbiLDLls (ORCPT <rfc822;jaysivo@gmail.com> + 99 others); Sun, 4 Dec 2022 06:41:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229928AbiLDLlH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 4 Dec 2022 06:41:07 -0500 Received: from smtp.smtpout.orange.fr (smtp-12.smtpout.orange.fr [80.12.242.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FA1C186C5 for <linux-kernel@vger.kernel.org>; Sun, 4 Dec 2022 03:39:51 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id 1nLYpvyXGap0Y1nLYp173T; Sun, 04 Dec 2022 12:39:49 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 04 Dec 2022 12:39:49 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: paulmck@kernel.org, elver@google.com, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr> Subject: [PATCH] init_task: Include <linux/rbtree.h> in the right file Date: Sun, 4 Dec 2022 12:39:47 +0100 Message-Id: <f06e810735c49a611e7dc75715f0689b5f7e87c6.1670153931.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751285186516407720?= X-GMAIL-MSGID: =?utf-8?q?1751285186516407720?= |
Series |
init_task: Include <linux/rbtree.h> in the right file
|
|
Commit Message
Christophe JAILLET
Dec. 4, 2022, 11:39 a.m. UTC
There is no need to include <linux/rbtree.h> in init_task.h.
Move it to the right place, in kernel/cred.c which uses RB_ROOT_CACHED.
This is a follow-up of commit 4e7e3adbba52 ("Expand various INIT_* macros
and remove") which moved things from init_task.h to init_task.c
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Let see if build-bots agree with me!
This patch depends on [1] and [2].
All these patches are related to init_task.h simplification.
They are unrelated and can be applied separately, but as they modify more
or less the same place in the same file, there may be some merge conflict.
[1]: https://lore.kernel.org/all/1a3d5bd51b7807471a913f8fa621e5a4ecd08e6a.1670100520.git.christophe.jaillet@wanadoo.fr/
[2]: https://lore.kernel.org/all/94c8f2123a8833b61d84a662ec35f9c070cdf4dd.1670147823.git.christophe.jaillet@wanadoo.fr/
---
include/linux/init_task.h | 1 -
init/init_task.c | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
Comments
[+Cc Ingo, who had been working on lots of include improvements.] The Cc list is odd -- it appears that get_maintainers.pl is broken on init_task.c: $> ./scripts/get_maintainer.pl init/init_task.c Mark Rutland <mark.rutland@arm.com> (commit_signer:1/1=100%) "Paul E. McKenney" <paulmck@kernel.org> (commit_signer:1/1=100%) Marco Elver <elver@google.com> (commit_signer:1/1=100%,authored:1/1=100%,removed_lines:5/5=100%) linux-kernel@vger.kernel.org (open list) What's going on here? On Sun, Dec 04, 2022 at 12:39PM +0100, Christophe JAILLET wrote: > There is no need to include <linux/rbtree.h> in init_task.h. > Move it to the right place, in kernel/cred.c which uses RB_ROOT_CACHED. > > This is a follow-up of commit 4e7e3adbba52 ("Expand various INIT_* macros > and remove") which moved things from init_task.h to init_task.c > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > --- > Let see if build-bots agree with me! > > This patch depends on [1] and [2]. > All these patches are related to init_task.h simplification. > > They are unrelated and can be applied separately, but as they modify more > or less the same place in the same file, there may be some merge conflict. > > [1]: https://lore.kernel.org/all/1a3d5bd51b7807471a913f8fa621e5a4ecd08e6a.1670100520.git.christophe.jaillet@wanadoo.fr/ > [2]: https://lore.kernel.org/all/94c8f2123a8833b61d84a662ec35f9c070cdf4dd.1670147823.git.christophe.jaillet@wanadoo.fr/ > --- > include/linux/init_task.h | 1 - > init/init_task.c | 1 + > 2 files changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/init_task.h b/include/linux/init_task.h > index 6d2c4ea4c97a..e18a6c6f6fd9 100644 > --- a/include/linux/init_task.h > +++ b/include/linux/init_task.h > @@ -9,7 +9,6 @@ > #include <linux/ipc.h> > #include <linux/user_namespace.h> > #include <linux/seqlock.h> > -#include <linux/rbtree.h> > #include <linux/refcount.h> > #include <linux/sched/autogroup.h> > #include <net/net_namespace.h> > diff --git a/init/init_task.c b/init/init_task.c > index ff6c4b9bfe6b..2392c0a67fb7 100644 > --- a/init/init_task.c > +++ b/init/init_task.c > @@ -2,6 +2,7 @@ > #include <linux/init_task.h> > #include <linux/export.h> > #include <linux/mqueue.h> > +#include <linux/rbtree.h> > #include <linux/sched.h> > #include <linux/sched/sysctl.h> > #include <linux/sched/rt.h> > -- > 2.34.1 >
On Sun, 2022-12-04 at 14:55 +0100, Marco Elver wrote: > [+Cc Ingo, who had been working on lots of include improvements.] > > The Cc list is odd -- it appears that get_maintainers.pl is broken on > init_task.c: > > $> ./scripts/get_maintainer.pl init/init_task.c > Mark Rutland <mark.rutland@arm.com> (commit_signer:1/1=100%) > "Paul E. McKenney" <paulmck@kernel.org> (commit_signer:1/1=100%) > Marco Elver <elver@google.com> (commit_signer:1/1=100%,authored:1/1=100%,removed_lines:5/5=100%) > linux-kernel@vger.kernel.org (open list) > > What's going on here? No one claims to be a maintainer of any init/ files ($ git grep "^F:.*init" MAINTAINERS) so by default it merely shows the people that have patched the particular file in the last year. You could perhaps see this better by adding --no-git --no-gitfallback to the get_maintainer.pl command line $ ./scripts/get_maintainer.pl --nogit --nogit-fallback init/init_task.c linux-kernel@vger.kernel.org (open list) see the --help option for details $ ./scripts/get_maintainer.pl --help usage: ./scripts/get_maintainer.pl [options] patchfile ./scripts/get_maintainer.pl [options] -f file|directory version: 0.26 MAINTAINER field selection options: --email => print email address(es) if any --git => include recent git *-by: signers --git-all-signature-types => include signers regardless of signature type or use only (Signed-off-by:|Reviewed-by:|Acked-by:) signers (default: 0) --git-fallback => use git when no exact MAINTAINERS pattern (default: 1) --git-chief-penguins => include (Linus Torvalds) --git-min-signatures => number of signatures required (default: 1) --git-max-maintainers => maximum maintainers to add (default: 5) --git-min-percent => minimum percentage of commits required (default: 5) --git-blame => use git blame to find modified commits for patch or file --git-blame-signatures => when used with --git-blame, also include all commit signers --git-since => git history to use (default: 1-year-ago) --hg-since => hg history to use (default: -365) --interactive => display a menu (mostly useful if used with the --git option) --m => include maintainer(s) if any --r => include reviewer(s) if any --n => include name 'Full Name <addr@domain.tld>' --l => include list(s) if any --moderated => include moderated lists(s) if any (default: true) --s => include subscriber only list(s) if any (default: false) --remove-duplicates => minimize duplicate email names/addresses --roles => show roles (status:subsystem, git-signer, list, etc...) --rolestats => show roles and statistics (commits/total_commits, %) --file-emails => add email addresses found in -f file (default: 0 (off)) --fixes => for patches, add signatures of commits with 'Fixes: <commit>' (default: 1 (on)) --scm => print SCM tree(s) if any --status => print status if any --subsystem => print subsystem name if any --web => print website(s) if any Output type options: --separator [, ] => separator for multiple entries on 1 line using --separator also sets --nomultiline if --separator is not [, ] --multiline => print 1 entry per line Other options: --pattern-depth => Number of pattern directory traversals (default: 0 (all)) --keywords => scan patch for keywords (default: 1) --sections => print all of the subsystem sections with pattern matches --letters => print all matching 'letter' types from all matching sections --mailmap => use .mailmap file (default: 1) --no-tree => run without a kernel tree --self-test => show potential issues with MAINTAINERS file content --version => show version --help => show this help information Default options: [--email --tree --nogit --git-fallback --m --r --n --l --multiline --pattern-depth=0 --remove-duplicates --rolestats] Notes: Using "-f directory" may give unexpected results: Used with "--git", git signators for _all_ files in and below directory are examined as git recurses directories. Any specified X: (exclude) pattern matches are _not_ ignored. Used with "--nogit", directory is used as a pattern match, no individual file within the directory or subdirectory is matched. Used with "--git-blame", does not iterate all files in directory Using "--git-blame" is slow and may add old committers and authors that are no longer active maintainers to the output. Using "--roles" or "--rolestats" with git send-email --cc-cmd or any other automated tools that expect only ["name"] <email address> may not work because of additional output after <email address>. Using "--rolestats" and "--git-blame" shows the #/total=% commits, not the percentage of the entire file authored. # of commits is not a good measure of amount of code authored. 1 major commit may contain a thousand lines, 5 trivial commits may modify a single line. If git is not installed, but mercurial (hg) is installed and an .hg repository exists, the following options apply to mercurial: --git, --git-min-signatures, --git-max-maintainers, --git-min-percent, and --git-blame Use --hg-since not --git-since to control date selection File ".get_maintainer.conf", if it exists in the linux kernel source root directory, can change whatever get_maintainer defaults are desired. Entries in this file can be any command line argument. This file is prepended to any additional command line arguments. Multiple lines and # comments are allowed. Most options have both positive and negative forms. The negative forms for --<foo> are --no<foo> and --no-<foo>.
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 6d2c4ea4c97a..e18a6c6f6fd9 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -9,7 +9,6 @@ #include <linux/ipc.h> #include <linux/user_namespace.h> #include <linux/seqlock.h> -#include <linux/rbtree.h> #include <linux/refcount.h> #include <linux/sched/autogroup.h> #include <net/net_namespace.h> diff --git a/init/init_task.c b/init/init_task.c index ff6c4b9bfe6b..2392c0a67fb7 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -2,6 +2,7 @@ #include <linux/init_task.h> #include <linux/export.h> #include <linux/mqueue.h> +#include <linux/rbtree.h> #include <linux/sched.h> #include <linux/sched/sysctl.h> #include <linux/sched/rt.h>