diff mbox

[V3,1/2] get_maintainer: allow keywords to match filenames

Message ID 1360626016-23332-1-git-send-email-swarren@wwwdotorg.org
State Superseded, archived
Headers show

Commit Message

Stephen Warren Feb. 11, 2013, 11:40 p.m. UTC
From: Stephen Warren <swarren@nvidia.com>

Allow K: entries in MAINTAINERS to match directly against filenames;
either those extracted from patch +++ or --- lines, or those specified
on the command-line using the -f option.

This potentially allows fewer lines in a MAINTAINERS entry, if all the
relevant files are scattered throughout the whole kernel tree, yet
contain some common keyword. An example would be using an ARM SoC name
as the keyword to catch all related drivers.

I don't think setting exact_pattern_match_hash would be appropriate here;
at least for intended Tegra use case, this feature is to ensure that all
Tegra-related driver changes get Cc'd to the Tegra mailing list. Setting
exact_pattern_match_hash would prevent git history parsing for e.g. S-o-b
tags, which still seems like it would be useful. Hence, this flag isn't
set.

The value in $hash{$tvi} doesn't seem relevant, so I just assign 0.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
V3: New patch.

Joe, I'm not sure if you care where this gets merged; could it go through
arm-soc together with patch 2/2? A quick look at git history of the
script in linux-next indicates there won't be conflicts doing that.

 scripts/get_maintainer.pl |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Joe Perches Feb. 12, 2013, midnight UTC | #1
On Mon, 2013-02-11 at 16:40 -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> Allow K: entries in MAINTAINERS to match directly against filenames;
> either those extracted from patch +++ or --- lines, or those specified
> on the command-line using the -f option.
[]
> I don't think setting exact_pattern_match_hash would be appropriate here;
> at least for intended Tegra use case, this feature is to ensure that all
> Tegra-related driver changes get Cc'd to the Tegra mailing list. Setting
> exact_pattern_match_hash would prevent git history parsing for e.g. S-o-b
> tags, which still seems like it would be useful. Hence, this flag isn't
> set.

And I don't think that's necessary because for filenames,
you could add the appropriate control to the MAINTAINERS

"K:	^pattern$"

> The value in $hash{$tvi} doesn't seem relevant, so I just assign 0.

0 is good.

It would be relevant if --pattern-depth was set.

> Joe, I'm not sure if you care where this gets merged; could it go through
> arm-soc together with patch 2/2? A quick look at git history of the
> script in linux-next indicates there won't be conflicts doing that.

I don't care how it gets merged.

Andrew Morton typically picks these up but
if you want to get it merged separately,
I don't see a problem.

trivial comment below:

> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
[]
> @@ -611,6 +611,10 @@ sub get_maintainers {
>  				    $hash{$tvi} = $value_pd;
>  				}
>  			    }
> +			} elsif ($type eq "K") {

This should probably be 'K' to match the other
'F' use above it.


--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Warren Feb. 12, 2013, 12:08 a.m. UTC | #2
On 02/11/2013 05:00 PM, Joe Perches wrote:
> On Mon, 2013-02-11 at 16:40 -0700, Stephen Warren wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> Allow K: entries in MAINTAINERS to match directly against filenames;
>> either those extracted from patch +++ or --- lines, or those specified
>> on the command-line using the -f option.
> []
>> I don't think setting exact_pattern_match_hash would be appropriate here;
>> at least for intended Tegra use case, this feature is to ensure that all
>> Tegra-related driver changes get Cc'd to the Tegra mailing list. Setting
>> exact_pattern_match_hash would prevent git history parsing for e.g. S-o-b
>> tags, which still seems like it would be useful. Hence, this flag isn't
>> set.
> 
> And I don't think that's necessary because for filenames,
> you could add the appropriate control to the MAINTAINERS
> 
> "K:	^pattern$"

Does "that" above mean "not setting exact_pattern_match_hash", or
"changing the patch so that it does set exact_pattern_match_hash". Sorry...
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Joe Perches Feb. 12, 2013, 12:16 a.m. UTC | #3
On Mon, 2013-02-11 at 17:08 -0700, Stephen Warren wrote:
> Does "that" above mean "not setting exact_pattern_match_hash", or
> "changing the patch so that it does set exact_pattern_match_hash". Sorry...

I think what you have is fine.


--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 18d4ab5..96cf92a 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -611,6 +611,10 @@  sub get_maintainers {
 				    $hash{$tvi} = $value_pd;
 				}
 			    }
+			} elsif ($type eq "K") {
+			    if ($file =~ m/$value/x) {
+				$hash{$tvi} = 0;
+			    }
 			}
 		    }
 		}