Skip to content

Commit 2a7cb1d

Browse files
JoePerchestorvalds
authored andcommitted
get_maintainer: add subsystem to reviewer output
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@perches.com> Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Cc: Lee Jones <lee.jones@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 4f07510 commit 2a7cb1d

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

‎scripts/get_maintainer.pl‎

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -974,20 +974,29 @@ sub find_ending_index {
974974
return $index;
975975
}
976976

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

980-
my $i;
981980
my $start = find_starting_index($index);
982-
my $end = find_ending_index($index);
983981

984-
my $role = "unknown";
985982
my $subsystem = $typevalue[$start];
986983
if ($output_section_maxlen && length($subsystem) > $output_section_maxlen) {
987984
$subsystem = substr($subsystem, 0, $output_section_maxlen - 3);
988985
$subsystem =~ s/\s*$//;
989986
$subsystem = $subsystem . "...";
990987
}
988+
return $subsystem;
989+
}
990+
991+
sub get_maintainer_role {
992+
my ($index) = @_;
993+
994+
my $i;
995+
my $start = find_starting_index($index);
996+
my $end = find_ending_index($index);
997+
998+
my $role = "unknown";
999+
my $subsystem = get_subsystem_name($index);
9911000

9921001
for ($i = $start + 1; $i < $end; $i++) {
9931002
my $tv = $typevalue[$i];
@@ -1021,16 +1030,7 @@ sub get_maintainer_role {
10211030
sub get_list_role {
10221031
my ($index) = @_;
10231032

1024-
my $i;
1025-
my $start = find_starting_index($index);
1026-
my $end = find_ending_index($index);
1027-
1028-
my $subsystem = $typevalue[$start];
1029-
if ($output_section_maxlen && length($subsystem) > $output_section_maxlen) {
1030-
$subsystem = substr($subsystem, 0, $output_section_maxlen - 3);
1031-
$subsystem =~ s/\s*$//;
1032-
$subsystem = $subsystem . "...";
1033-
}
1033+
my $subsystem = get_subsystem_name($index);
10341034

10351035
if ($subsystem eq "THE REST") {
10361036
$subsystem = "";
@@ -1118,7 +1118,8 @@ sub add_categories {
11181118
}
11191119
}
11201120
if ($email_reviewer) {
1121-
push_email_addresses($pvalue, 'reviewer');
1121+
my $subsystem = get_subsystem_name($i);
1122+
push_email_addresses($pvalue, "reviewer:$subsystem");
11221123
}
11231124
} elsif ($ptype eq "T") {
11241125
push(@scm, $pvalue);

0 commit comments

Comments
 (0)