Understanding get_maintainer.pl and MAINTAINERS

Bjørn Mork bjorn at mork.no
Thu Mar 9 04:22:06 EST 2017


Bjørn Mork <bjorn at mork.no> writes:

> The N entries are regex patterns.  "bcm281*" matches any name starting
> with "bcm28", followed by 0 or more 1's.

This isn't entirely correct. I assumed there was some implicit anchoring
on path name components, but there isnt. So "bcm281*" will match any
file containing "bcm28" somewhere in the path.

I am obviously not the first one making that bogus assumption. Very few
of the "N:" entries in MAINTAINERS are anchored in any way.  The rest of
them are likely buggy.  No one expects these strings to match in the
middle of arbitrary path names.  Even the example is a bit too wild
IMHO:

        N: Files and directories with regex patterns.
           N:   [^a-z]tegra     all files whose path contains the word tegra

The '[^a-z]' prevents this from matching any word containing "tegra".
But it will still match e.g "INtegrator" or "b1tegrasp", which is
unexpected.  It would be better to use a more explicit anchor, like
'[-/]tegra'.  Or maybe even "/tegra".




Bjørn




More information about the Kernelnewbies mailing list