how do you find the subsystem of a file?

Valdis Kl=?utf-8?Q?=c4=93?=tnieks valdis.kletnieks at vt.edu
Sat Aug 21 20:23:53 EDT 2021


On Sat, 21 Aug 2021 16:19:31 -0700, daniel watson said:
> On Sat, Aug 21, 2021 at 12:30:27AM -0700, daniel watson wrote:

> > Documentation/process/submitting-patches.rst says to see the T: entry
> > for the subsystem in MAINTAINERS to find the right tree to base the
> > patch on.

If there's no better entry listed in a T:, the linux-next tree is a good default.
Failing that, a recent pull of Linus's tree is usually OK (though can cause issues
with conflicts if other people are working on the area and their patches are in
linux-next already). Since the linux-next tree is rebuild every day, it's usually
only 24 hours or so behind the 200+ maintainer trees that feed it.

The quick cheat sheet for linux-next:

$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

$ git remote add linux-next git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
$ git fetch linux-next
$ git fetch --tags linux-next
... # later on
$ git remote update

$ git checkout next-20210820 (or whatever the one you want is)

Don't use 'git pull' against a linux-next tree, as it won't do what you want,
use 'remote update'. (The gory details - it rebases every day due to the way
it is built)

Also, you can bisect between a 'next-20210605' tag and  a Linus 'v5.13-rc3'
type tag, but bisecting between two 'next-mmm'  tags will fail, for the same
reasons that git pull will blow chunks.

> > in addition, how do i know what branch to use?  the T: entries have a
> > repo, but not a branch name.

You want it pointing at master/HEAD unless you have a *damned* good reason
to use something else (usually "maintainer specifically told you to use a different
branch")

> the output of
>
> git log --oneline -1 <path>
>
> should have the subsystem listed at the beginning.

Actually, it's not *necessarily* 'subsystem' - it's "what the tree maintainer
wants as the start of the Subject: line", which can sometimes be different.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20210821/b4a69ec8/attachment.sig>


More information about the Kernelnewbies mailing list