Skip to content

Commit

Permalink
get_maintainer: add subsystem to reviewer output
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Krzysztof Kozlowski <[email protected]>
Cc: Lee Jones <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Nov 7, 2015
1 parent 4f07510 commit 2a7cb1d
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions scripts/get_maintainer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -974,20 +974,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];
Expand Down Expand Up @@ -1021,16 +1030,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 = "";
Expand Down Expand Up @@ -1118,7 +1118,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);
Expand Down

0 comments on commit 2a7cb1d

Please sign in to comment.