From 608e8e66a154cbc3d591a59dcebfd9cbc9e3431a Mon Sep 17 00:00:00 2001 From: Mel Gorman Date: Tue, 16 Jun 2009 15:33:04 -0700 Subject: mm: add a gfp-translate script to help understand page allocation failure reports The page allocation failure messages include a line that looks like page allocation failure. order:1, mode:0x4020 The mode is easy to translate but irritating for the lazy and a bit error prone. This patch adds a very simple helper script gfp-translate for the mode: portion of the page allocation failure messages. An example usage looks like mel@machina:~/linux-2.6 $ scripts/gfp-translate 0x4020 Source: /home/mel/linux-2.6 Parsing: 0x4020 #define __GFP_HIGH (0x20) /* Should access emergency pools? */ #define __GFP_COMP (0x4000) /* Add compound page metadata */ The script is not a work of art but it has come in handy for me a few times so I thought I would share. [akpm@linux-foundation.org: clarify an error message] Signed-off-by: Mel Gorman Acked-by: Rik van Riel Acked-by: Pekka Enberg Cc: Christoph Hellwig Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/gfp-translate | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 scripts/gfp-translate (limited to 'scripts') diff --git a/scripts/gfp-translate b/scripts/gfp-translate new file mode 100644 index 000000000000..073cb6d152a0 --- /dev/null +++ b/scripts/gfp-translate @@ -0,0 +1,81 @@ +#!/bin/bash +# Translate the bits making up a GFP mask +# (c) 2009, Mel Gorman +# Licensed under the terms of the GNU GPL License version 2 +SOURCE= +GFPMASK=none + +# Helper function to report failures and exit +die() { + echo ERROR: $@ + if [ "$TMPFILE" != "" ]; then + rm -f $TMPFILE + fi + exit -1 +} + +usage() { + echo "usage: gfp-translate [-h] [ --source DIRECTORY ] gfpmask" + exit 0 +} + +# Parse command-line arguements +while [ $# -gt 0 ]; do + case $1 in + --source) + SOURCE=$2 + shift 2 + ;; + -h) + usage + ;; + --help) + usage + ;; + *) + GFPMASK=$1 + shift + ;; + esac +done + +# Guess the kernel source directory if it's not set. Preference is in order of +# o current directory +# o /usr/src/linux +if [ "$SOURCE" = "" ]; then + if [ -r "/usr/src/linux/Makefile" ]; then + SOURCE=/usr/src/linux + fi + if [ -r "`pwd`/Makefile" ]; then + SOURCE=`pwd` + fi +fi + +# Confirm that a source directory exists +if [ ! -r "$SOURCE/Makefile" ]; then + die "Could not locate kernel source directory or it is invalid" +fi + +# Confirm that a GFP mask has been specified +if [ "$GFPMASK" = "none" ]; then + usage +fi + +# Extract GFP flags from the kernel source +TMPFILE=`mktemp -t gfptranslate-XXXXXX` || exit 1 +grep "^#define __GFP" $SOURCE/include/linux/gfp.h | sed -e 's/(__force gfp_t)//' | sed -e 's/u)/)/' | grep -v GFP_BITS | sed -e 's/)\//) \//' > $TMPFILE + +# Parse the flags +IFS=" +" +echo Source: $SOURCE +echo Parsing: $GFPMASK +for LINE in `cat $TMPFILE`; do + MASK=`echo $LINE | awk '{print $3}'` + if [ $(($GFPMASK&$MASK)) -ne 0 ]; then + echo $LINE + fi +done + +rm -f $TMPFILE +exit 0 -- cgit v1.2.3 From 290603c1205242691b8a0963f496d0aa80e9ca02 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 16 Jun 2009 15:33:58 -0700 Subject: scripts/get_maintainer.pl: output first field only in mailing lists and after maintainers. Fix mailing lists that are described, but not "(subscriber-only)" Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 60dc0c48c929..c4b25a7a2599 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -13,7 +13,7 @@ use strict; my $P = $0; -my $V = '0.15'; +my $V = '0.16'; use Getopt::Long qw(:config no_auto_abbrev); @@ -169,6 +169,7 @@ foreach my $file (@ARGV) { } my @email_to = (); +my @list_to = (); my @scm = (); my @web = (); my @subsystem = (); @@ -182,7 +183,7 @@ foreach my $file (@files) { my $exclude = 0; foreach my $line (@typevalue) { - if ($line =~ m/^(\C):(.*)/) { + if ($line =~ m/^(\C):\s*(.*)/) { my $type = $1; my $value = $2; if ($type eq 'X') { @@ -196,7 +197,7 @@ foreach my $file (@files) { if (!$exclude) { my $tvi = 0; foreach my $line (@typevalue) { - if ($line =~ m/^(\C):(.*)/) { + if ($line =~ m/^(\C):\s*(.*)/) { my $type = $1; my $value = $2; if ($type eq 'F') { @@ -229,15 +230,18 @@ if ($email_git_penguin_chiefs) { } } -if ($email) { - my $address_cnt = @email_to; - if ($address_cnt == 0 && $email_list) { - push(@email_to, "linux-kernel\@vger.kernel.org"); +if ($email || $email_list) { + my @to = (); + if ($email) { + @to = (@to, @email_to); } - -#Don't sort email address list, but do remove duplicates - @email_to = uniq(@email_to); - output(@email_to); + if ($email_list) { + if (@list_to == 0) { + push(@list_to, "linux-kernel\@vger.kernel.org"); + @to = (@to, @list_to); + } + } + output(uniq(@to)); } if ($scm) { @@ -307,7 +311,7 @@ Output type options: --multiline => print 1 entry per line Default options: - [--email --git --m --l --multiline] + [--email --git --m --n --l --multiline] Other options: --version -> show version @@ -366,26 +370,30 @@ sub add_categories { $index = $index - 1; while ($index >= 0) { my $tv = $typevalue[$index]; - if ($tv =~ m/^(\C):(.*)/) { + if ($tv =~ m/^(\C):\s*(.*)/) { my $ptype = $1; my $pvalue = $2; if ($ptype eq "L") { - my $subscr = $pvalue; - if ($subscr =~ m/\s*\(subscribers-only\)/) { + my $list_address = $pvalue; + my $list_additional = ""; + if ($list_address =~ m/([^\s]+)\s+(.*)$/) { + $list_address = $1; + $list_additional = $2; + } + if ($list_additional =~ m/\(subscribers-only\)/) { if ($email_subscriber_list) { - $subscr =~ s/\s*\(subscribers-only\)//g; - push(@email_to, $subscr); + push(@list_to, $list_address); } } else { if ($email_list) { - push(@email_to, $pvalue); + push(@list_to, $list_address); } } } elsif ($ptype eq "M") { if ($email_maintainer) { if ($index >= 0) { my $tv = $typevalue[$index - 1]; - if ($tv =~ m/^(\C):(.*)/) { + if ($tv =~ m/^(\C):\s*(.*)/) { if ($1 eq "P" && $email_usename) { push(@email_to, format_email($2, $pvalue)); } else { -- cgit v1.2.3 From bdf7c685aa4639c95a752b52fa06741a7e3bb34e Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 16 Jun 2009 15:33:59 -0700 Subject: scripts/get_maintainer.pl: better fix for subscriber-only mailing lists Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index c4b25a7a2599..f302ad3759f3 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -380,7 +380,7 @@ sub add_categories { $list_address = $1; $list_additional = $2; } - if ($list_additional =~ m/\(subscribers-only\)/) { + if ($list_additional =~ m/subscribers-only/) { if ($email_subscriber_list) { push(@list_to, $list_address); } -- cgit v1.2.3 From f5f5078db2c61bf42ed20527731c0a23bed86c11 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 16 Jun 2009 15:34:00 -0700 Subject: scripts/get_maintainer.pl: improve --git-chief-penquins (Linus Torvalds) filtering Moved linux-kernel@vger.kernel.org to MAINTAINERS lkml will be added to all CC lists via F: pattern match Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index f302ad3759f3..1eb67fc543df 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -216,15 +216,19 @@ foreach my $file (@files) { } -if ($email_git_penguin_chiefs) { +if ($email) { foreach my $chief (@penguin_chief) { if ($chief =~ m/^(.*):(.*)/) { - my $chief_name = $1; - my $chief_addr = $2; + my $email_address; if ($email_usename) { - push(@email_to, format_email($chief_name, $chief_addr)); + $email_address = format_email($1, $2); } else { - push(@email_to, $chief_addr); + $email_address = $2; + } + if ($email_git_penguin_chiefs) { + push(@email_to, $email_address); + } else { + @email_to = grep(!/${email_address}/, @email_to); } } } @@ -236,10 +240,7 @@ if ($email || $email_list) { @to = (@to, @email_to); } if ($email_list) { - if (@list_to == 0) { - push(@list_to, "linux-kernel\@vger.kernel.org"); @to = (@to, @list_to); - } } output(uniq(@to)); } @@ -314,7 +315,7 @@ Default options: [--email --git --m --n --l --multiline] Other options: - --version -> show version + --version => show version --help => show this help information EOT @@ -423,7 +424,7 @@ sub add_categories { sub which { my ($bin) = @_; - foreach my $path (split /:/, $ENV{PATH}) { + foreach my $path (split(/:/, $ENV{PATH})) { if (-e "$path/$bin") { return "$path/$bin"; } @@ -446,12 +447,8 @@ sub recent_git_signoffs { } $cmd = "git log --since=${email_git_since} -- ${file}"; - $cmd .= " | grep -Pi \"^[-_ a-z]+by:.*\\\@\""; - if (!$email_git_penguin_chiefs) { - $cmd .= " | grep -Pv \"${penguin_chiefs}\""; - } + $cmd .= " | grep -Pi \"^[-_ a-z]+by:.*\\\@.*\$\""; $cmd .= " | cut -f2- -d\":\""; - $cmd .= " | sed -e \"s/^\\s+//g\""; $cmd .= " | sort | uniq -c | sort -rn"; $output = `${cmd}`; -- cgit v1.2.3 From de2fc4922b7db1f5099585f821f854a86b5828eb Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 16 Jun 2009 15:34:01 -0700 Subject: scripts/get_maintainer.pl: warn on missing git or git repository support older versions of grep (use -E not -P) no need to return data in routine recent_git_signoffs Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 1eb67fc543df..22c7f4e740f1 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -443,11 +443,21 @@ sub recent_git_signoffs { my @lines = (); if (which("git") eq "") { - die("$P: git not found. Add --nogit to options?\n"); + warn("$P: git not found. Add --nogit to options?\n"); + return; + } + if (!(-d ".git")) { + warn("$P: .git repository not found.\n"); + warn("Use a .git repository for better results.\n"); + warn("ie: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n"); + return; } $cmd = "git log --since=${email_git_since} -- ${file}"; - $cmd .= " | grep -Pi \"^[-_ a-z]+by:.*\\\@.*\$\""; + $cmd .= " | grep -Ei \"^[-_ a-z]+by:.*\\\@.*\$\""; + if (!$email_git_penguin_chiefs) { + $cmd .= " | grep -Ev \"${penguin_chiefs}\""; + } $cmd .= " | cut -f2- -d\":\""; $cmd .= " | sort | uniq -c | sort -rn"; @@ -486,7 +496,6 @@ sub recent_git_signoffs { push(@email_to, $line); } } - return $output; } sub uniq { -- cgit v1.2.3 From 1b5e1cf64a7a376417457c7f2b3885decea276e4 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 16 Jun 2009 15:34:01 -0700 Subject: scripts/get_maintainer.pl: support M: lines with names and multiple entries per M: line Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 145 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 129 insertions(+), 16 deletions(-) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 22c7f4e740f1..7cf4309932f3 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -55,6 +55,10 @@ foreach my $chief (@penguin_chief) { } my $penguin_chiefs = "\(" . join("|",@penguin_chief_names) . "\)"; +# rfc822 - preloaded methods go here. +my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; +my $rfc822_char = '[\\000-\\177]'; + if (!GetOptions( 'email!' => \$email, 'git!' => \$email_git, @@ -392,18 +396,7 @@ sub add_categories { } } elsif ($ptype eq "M") { if ($email_maintainer) { - if ($index >= 0) { - my $tv = $typevalue[$index - 1]; - if ($tv =~ m/^(\C):\s*(.*)/) { - if ($1 eq "P" && $email_usename) { - push(@email_to, format_email($2, $pvalue)); - } else { - push(@email_to, $pvalue); - } - } - } else { - push(@email_to, $pvalue); - } + push_email_addresses($pvalue); } } elsif ($ptype eq "T") { push(@scm, $pvalue); @@ -421,6 +414,36 @@ sub add_categories { } } +sub push_email_address { + my ($email_address) = @_; + + my $email_name = ""; + if ($email_address =~ m/([^<]+)<(.*\@.*)>$/) { + $email_name = $1; + $email_address = $2; + } + + if ($email_usename && $email_name) { + push(@email_to, format_email($email_name, $email_address)); + } else { + push(@email_to, $email_address); + } +} + +sub push_email_addresses { + my ($address) = @_; + + my @address_list = (); + + if (@address_list = rfc822_validlist($address)) { + my $array_count = shift(@address_list); + while (my $entry = shift(@address_list)) { + push_email_address($entry); + } + } + +} + sub which { my ($bin) = @_; @@ -480,10 +503,6 @@ sub recent_git_signoffs { if ($line =~ m/(.+)<(.+)>/) { my $git_name = $1; my $git_addr = $2; - $git_name =~ tr/^\"//; - $git_name =~ tr/^\\s*//; - $git_name =~ tr/\"$//; - $git_name =~ tr/\\s*$//; if ($email_usename) { push(@email_to, format_email($git_name, $git_addr)); } else { @@ -527,3 +546,97 @@ sub output { print("\n"); } } + +my $rfc822re; + +sub make_rfc822re { +# Basic lexical tokens are specials, domain_literal, quoted_string, atom, and +# comment. We must allow for rfc822_lwsp (or comments) after each of these. +# This regexp will only work on addresses which have had comments stripped +# and replaced with rfc822_lwsp. + + my $specials = '()<>@,;:\\\\".\\[\\]'; + my $controls = '\\000-\\037\\177'; + + my $dtext = "[^\\[\\]\\r\\\\]"; + my $domain_literal = "\\[(?:$dtext|\\\\.)*\\]$rfc822_lwsp*"; + + my $quoted_string = "\"(?:[^\\\"\\r\\\\]|\\\\.|$rfc822_lwsp)*\"$rfc822_lwsp*"; + +# Use zero-width assertion to spot the limit of an atom. A simple +# $rfc822_lwsp* causes the regexp engine to hang occasionally. + my $atom = "[^$specials $controls]+(?:$rfc822_lwsp+|\\Z|(?=[\\[\"$specials]))"; + my $word = "(?:$atom|$quoted_string)"; + my $localpart = "$word(?:\\.$rfc822_lwsp*$word)*"; + + my $sub_domain = "(?:$atom|$domain_literal)"; + my $domain = "$sub_domain(?:\\.$rfc822_lwsp*$sub_domain)*"; + + my $addr_spec = "$localpart\@$rfc822_lwsp*$domain"; + + my $phrase = "$word*"; + my $route = "(?:\@$domain(?:,\@$rfc822_lwsp*$domain)*:$rfc822_lwsp*)"; + my $route_addr = "\\<$rfc822_lwsp*$route?$addr_spec\\>$rfc822_lwsp*"; + my $mailbox = "(?:$addr_spec|$phrase$route_addr)"; + + my $group = "$phrase:$rfc822_lwsp*(?:$mailbox(?:,\\s*$mailbox)*)?;\\s*"; + my $address = "(?:$mailbox|$group)"; + + return "$rfc822_lwsp*$address"; +} + +sub rfc822_strip_comments { + my $s = shift; +# Recursively remove comments, and replace with a single space. The simpler +# regexps in the Email Addressing FAQ are imperfect - they will miss escaped +# chars in atoms, for example. + + while ($s =~ s/^((?:[^"\\]|\\.)* + (?:"(?:[^"\\]|\\.)*"(?:[^"\\]|\\.)*)*) + \((?:[^()\\]|\\.)*\)/$1 /osx) {} + return $s; +} + +# valid: returns true if the parameter is an RFC822 valid address +# +sub rfc822_valid ($) { + my $s = rfc822_strip_comments(shift); + + if (!$rfc822re) { + $rfc822re = make_rfc822re(); + } + + return $s =~ m/^$rfc822re$/so && $s =~ m/^$rfc822_char*$/; +} + +# validlist: In scalar context, returns true if the parameter is an RFC822 +# valid list of addresses. +# +# In list context, returns an empty list on failure (an invalid +# address was found); otherwise a list whose first element is the +# number of addresses found and whose remaining elements are the +# addresses. This is needed to disambiguate failure (invalid) +# from success with no addresses found, because an empty string is +# a valid list. + +sub rfc822_validlist ($) { + my $s = rfc822_strip_comments(shift); + + if (!$rfc822re) { + $rfc822re = make_rfc822re(); + } + # * null list items are valid according to the RFC + # * the '1' business is to aid in distinguishing failure from no results + + my @r; + if ($s =~ m/^(?:$rfc822re)?(?:,(?:$rfc822re)?)*$/so && + $s =~ m/^$rfc822_char*$/) { + while($s =~ m/(?:^|,$rfc822_lwsp*)($rfc822re)/gos) { + push @r, $1; + } + return wantarray ? (scalar(@r), @r) : 1; + } + else { + return wantarray ? () : 0; + } +} -- cgit v1.2.3 From d789504ab03c27b194170262cb4ffda38905c5c0 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 16 Jun 2009 15:34:02 -0700 Subject: scripts/get_maintainer.pl: better email name quoting Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 7cf4309932f3..159ce64ad26b 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -356,6 +356,7 @@ sub format_email { my ($name, $email) = @_; $name =~ s/^\s+|\s+$//g; + $name =~ s/^\"|\"$//g; $email =~ s/^\s+|\s+$//g; my $formatted_email = ""; -- cgit v1.2.3 From 5f2441e97684cfc787873f884c715e109ffcfbcd Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 16 Jun 2009 15:34:02 -0700 Subject: scripts/get_maintainer.pl: support both "P:/M:" and integrated "M:" lines Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 159ce64ad26b..a1a43cffbc96 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -55,7 +55,7 @@ foreach my $chief (@penguin_chief) { } my $penguin_chiefs = "\(" . join("|",@penguin_chief_names) . "\)"; -# rfc822 - preloaded methods go here. +# rfc822 email address - preloaded methods go here. my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; my $rfc822_char = '[\\000-\\177]'; @@ -396,7 +396,19 @@ sub add_categories { } } } elsif ($ptype eq "M") { - if ($email_maintainer) { + my $p_used = 0; + if ($index >= 0) { + my $tv = $typevalue[$index - 1]; + if ($tv =~ m/^(\C):\s*(.*)/) { + if ($1 eq "P") { + if ($email_usename) { + push_email_address(format_email($2, $pvalue)); + $p_used = 1; + } + } + } + } + if (!$p_used) { push_email_addresses($pvalue); } } elsif ($ptype eq "T") { @@ -436,13 +448,16 @@ sub push_email_addresses { my @address_list = (); - if (@address_list = rfc822_validlist($address)) { + if (rfc822_valid($address)) { + push_email_address($address); + } elsif (@address_list = rfc822_validlist($address)) { my $array_count = shift(@address_list); while (my $entry = shift(@address_list)) { push_email_address($entry); } + } else { + warn("Invalid MAINTAINERS address: '" . $address . "'\n"); } - } sub which { @@ -471,9 +486,8 @@ sub recent_git_signoffs { return; } if (!(-d ".git")) { - warn("$P: .git repository not found.\n"); - warn("Use a .git repository for better results.\n"); - warn("ie: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n"); + warn("$P: .git directory not found. Use a git repository for better results.\n"); + warn("$P: perhaps 'git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git'\n"); return; } @@ -632,7 +646,7 @@ sub rfc822_validlist ($) { my @r; if ($s =~ m/^(?:$rfc822re)?(?:,(?:$rfc822re)?)*$/so && $s =~ m/^$rfc822_char*$/) { - while($s =~ m/(?:^|,$rfc822_lwsp*)($rfc822re)/gos) { + while ($s =~ m/(?:^|,$rfc822_lwsp*)($rfc822re)/gos) { push @r, $1; } return wantarray ? (scalar(@r), @r) : 1; -- cgit v1.2.3 From 0a79c492bcb1022e9a2d0bcb5ed6c624ef6641a0 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 16 Jun 2009 15:34:03 -0700 Subject: scripts/get_maintainer.pl: don't print maintainers when not requested Fixed bug introduced after using rfc822 address checking. Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index a1a43cffbc96..e57c3f6eede7 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -436,10 +436,12 @@ sub push_email_address { $email_address = $2; } - if ($email_usename && $email_name) { - push(@email_to, format_email($email_name, $email_address)); - } else { - push(@email_to, $email_address); + if ($email_maintainer) { + if ($email_usename && $email_name) { + push(@email_to, format_email($email_name, $email_address)); + } else { + push(@email_to, $email_address); + } } } -- cgit v1.2.3 From df4cc036828f6027689016a91adadee405eab104 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 16 Jun 2009 15:34:04 -0700 Subject: scripts/get_maintainer.pl: allow 8 bit characters in email addresses Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index e57c3f6eede7..19854f51c8f3 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -57,7 +57,7 @@ my $penguin_chiefs = "\(" . join("|",@penguin_chief_names) . "\)"; # rfc822 email address - preloaded methods go here. my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; -my $rfc822_char = '[\\000-\\177]'; +my $rfc822_char = '[\\000-\\377]'; if (!GetOptions( 'email!' => \$email, -- cgit v1.2.3 From 7f29fd2748ac8a8a47c949b26e5a9749b1b804fb Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 16 Jun 2009 15:34:04 -0700 Subject: scripts/get_maintainer.pl: change "die" to "warn" when command line file is not a patch fixes git send-email with a cover letter Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 19854f51c8f3..3e733146cd51 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -165,7 +165,7 @@ foreach my $file (@ARGV) { } close(PATCH); if ($file_cnt == @files) { - die "$P: file '${file}' doesn't appear to be a patch. " + warn "$P: file '${file}' doesn't appear to be a patch. " . "Add -f to options?\n"; } @files = sort_and_uniq(@files); -- cgit v1.2.3 From ae52bb2384f721562f15f719de1acb8e934733cb Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 16 Jun 2009 15:34:19 -0700 Subject: fbdev: move logo externs to header file Now we have __initconst, we can finally move the external declarations for the various Linux logo structures to . James' ack dates back to the previous submission (way to long ago), when the logos were still __initdata, which caused failures on some platforms with some toolchain versions. Signed-off-by: Geert Uytterhoeven Acked-by: James Simmons Cc: Krzysztof Helt Cc: Sam Ravnborg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/pnmtologo.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/pnmtologo.c b/scripts/pnmtologo.c index 6aa2a2483f8d..64f5ddb09ea6 100644 --- a/scripts/pnmtologo.c +++ b/scripts/pnmtologo.c @@ -237,22 +237,22 @@ static void write_header(void) fprintf(out, " * Linux logo %s\n", logoname); fputs(" */\n\n", out); fputs("#include \n\n", out); - fprintf(out, "static unsigned char %s_data[] __initdata = {\n", + fprintf(out, "static const unsigned char %s_data[] __initconst = {\n", logoname); } static void write_footer(void) { fputs("\n};\n\n", out); - fprintf(out, "struct linux_logo %s __initdata = {\n", logoname); - fprintf(out, " .type\t= %s,\n", logo_types[logo_type]); - fprintf(out, " .width\t= %d,\n", logo_width); - fprintf(out, " .height\t= %d,\n", logo_height); + fprintf(out, "const struct linux_logo %s __initconst = {\n", logoname); + fprintf(out, "\t.type\t\t= %s,\n", logo_types[logo_type]); + fprintf(out, "\t.width\t\t= %d,\n", logo_width); + fprintf(out, "\t.height\t\t= %d,\n", logo_height); if (logo_type == LINUX_LOGO_CLUT224) { - fprintf(out, " .clutsize\t= %d,\n", logo_clutsize); - fprintf(out, " .clut\t= %s_clut,\n", logoname); + fprintf(out, "\t.clutsize\t= %d,\n", logo_clutsize); + fprintf(out, "\t.clut\t\t= %s_clut,\n", logoname); } - fprintf(out, " .data\t= %s_data\n", logoname); + fprintf(out, "\t.data\t\t= %s_data\n", logoname); fputs("};\n\n", out); /* close logo file */ @@ -374,7 +374,7 @@ static void write_logo_clut224(void) fputs("\n};\n\n", out); /* write logo clut */ - fprintf(out, "static unsigned char %s_clut[] __initdata = {\n", + fprintf(out, "static const unsigned char %s_clut[] __initconst = {\n", logoname); write_hex_cnt = 0; for (i = 0; i < logo_clutsize; i++) { -- cgit v1.2.3