Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d3a9f67 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

checkpatch: report the right line # when using --emacs and --file



commit 34d8815f ("checkpatch: add --showfile to allow input via pipe
to show filenames") broke the --emacs with --file option.

Fix it.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 100425de
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2166,8 +2166,12 @@ sub process {
		if ($showfile) {
			$prefix = "$realfile:$realline: "
		} elsif ($emacs) {
			if ($file) {
				$prefix = "$filename:$realline: ";
			} else {
				$prefix = "$filename:$linenr: ";
			}
		}

		if ($found_file) {
			if ($realfile =~ m@^(drivers/net/|net/)@) {