* [PATCH] checkpatch: Report the right line # when using --emacs and --file
@ 2015-07-23 19:35 Joe Perches
0 siblings, 0 replies; only message in thread
From: Joe Perches @ 2015-07-23 19:35 UTC (permalink / raw)
To: Andrew Morton; +Cc: Andy Whitcroft, LKML
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 <joe@perches.com>
---
scripts/checkpatch.pl | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c0a95aa..137bd1c 100755
--- 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) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-23 19:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-23 19:35 [PATCH] checkpatch: Report the right line # when using --emacs and --file Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®