[PATCH] get_maintainer: Add subsystem to reviewer output

From: Joe Perches
Date: Wed Oct 28 2015 - 12:41:55 EST


Reviewer output currently does not include the subsystem
that matched. Add it.

Miscellanea:

o Add a get_subsystem_name routine to centralize this

Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---
scripts/get_maintainer.pl | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 98bae86..d641541 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -970,20 +970,29 @@ sub find_ending_index {
return $index;
}

-sub get_maintainer_role {
+sub get_subsystem_name {
my ($index) = @_;

- my $i;
my $start = find_starting_index($index);
- my $end = find_ending_index($index);

- my $role = "unknown";
my $subsystem = $typevalue[$start];
if ($output_section_maxlen && length($subsystem) > $output_section_maxlen) {
$subsystem = substr($subsystem, 0, $output_section_maxlen - 3);
$subsystem =~ s/\s*$//;
$subsystem = $subsystem . "...";
}
+ return $subsystem;
+}
+
+sub get_maintainer_role {
+ my ($index) = @_;
+
+ my $i;
+ my $start = find_starting_index($index);
+ my $end = find_ending_index($index);
+
+ my $role = "unknown";
+ my $subsystem = get_subsystem_name($index);

for ($i = $start + 1; $i < $end; $i++) {
my $tv = $typevalue[$i];
@@ -1017,16 +1026,7 @@ sub get_maintainer_role {
sub get_list_role {
my ($index) = @_;

- my $i;
- my $start = find_starting_index($index);
- my $end = find_ending_index($index);
-
- my $subsystem = $typevalue[$start];
- if ($output_section_maxlen && length($subsystem) > $output_section_maxlen) {
- $subsystem = substr($subsystem, 0, $output_section_maxlen - 3);
- $subsystem =~ s/\s*$//;
- $subsystem = $subsystem . "...";
- }
+ my $subsystem = get_subsystem_name($index);

if ($subsystem eq "THE REST") {
$subsystem = "";
@@ -1114,7 +1114,8 @@ sub add_categories {
}
}
if ($email_reviewer) {
- push_email_addresses($pvalue, 'reviewer');
+ my $subsystem = get_subsystem_name($i);
+ push_email_addresses($pvalue, "reviewer:$subsystem");
}
} elsif ($ptype eq "T") {
push(@scm, $pvalue);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/