projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
100425d
)
checkpatch: report the right line # when using --emacs and --file
author
Joe Perches
<
[email protected]
>
Wed, 9 Sep 2015 22:37:39 +0000
(15:37 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 10 Sep 2015 20:29:01 +0000
(13:29 -0700)
commit
34d8815f9512
("checkpatch: add --showfile to allow input via pipe
to show filenames") broke the --emacs with --file option.
Fix it.
Signed-off-by: Joe Perches <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
scripts/checkpatch.pl
patch
|
blob
|
history
diff --git
a/scripts/checkpatch.pl
b/scripts/checkpatch.pl
index 780c91d82aa9a649b00df444515245bc22841fce..ea28336ea2a559749754b427471a1cef2bd18606 100755
(executable)
--- a/
scripts/checkpatch.pl
+++ b/
scripts/checkpatch.pl
@@
-2166,7
+2166,11
@@
sub process {
if ($showfile) {
$prefix = "$realfile:$realline: "
} elsif ($emacs) {
- $prefix = "$filename:$linenr: ";
+ if ($file) {
+ $prefix = "$filename:$realline: ";
+ } else {
+ $prefix = "$filename:$linenr: ";
+ }
}
if ($found_file) {