how do you find the subsystem of a file?

Greg KH greg at
Wed Sep 1 02:37:03 EDT 2021

On Sat, Aug 21, 2021 at 12:30:27AM -0700, daniel watson wrote:
> i wrote a patch that got rejected because it did not apply cleanly to
> the tree of greg kh
> the file i modified is
> drivers/staging/rtl8723bs/include/rtl8192c_recv.h
> gave me the list of emails to send the patch to,
> and i used it for that purpose.  the file
> 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.  i tried searching through MAINTAINERS and found that there
> are a few subsystems that start with RTL8*.
> greg kh is listed a few times in MAINTAINERS, so i'm not able to find
> the exact tree to start with by looking for the maintainer.
> is there a systematic way of finding the subsystem, given a file?

Yes, use the tool you already used:

$ ./scripts/ drivers/staging/rtl8723bs/include/rtl8192c_recv.h
Greg Kroah-Hartman <gregkh at> (supporter:STAGING SUBSYSTEM)
linux-staging at (open list:STAGING SUBSYSTEM)
linux-kernel at (open list)

That shows this file is in the staging subsystem, and there's the list
to send the patch to, as well as the person you should cc: on it.

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

You can always ask the subsystem maintainer about what branch to use if
you have a question.


greg k-h

More information about the Kernelnewbies mailing list