diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py index be78fc510b..2915d97950 100644 --- a/tools/patman/checkpatch.py +++ b/tools/patman/checkpatch.py @@ -138,7 +138,7 @@ def GetWarningMsg(col, msg_type, fname, line, msg): msg_type = col.Color(col.RED, msg_type) elif msg_type == 'check': msg_type = col.Color(col.MAGENTA, msg_type) - return '%s: %s,%d: %s' % (msg_type, fname, line, msg) + return '%s:%d: %s: %s\n' % (fname, line, msg_type, msg) def CheckPatches(verbose, args): '''Run the checkpatch.pl script on each patch''' @@ -157,7 +157,8 @@ def CheckPatches(verbose, args): result.checks): print("Internal error: some problems lost") for item in result.problems: - print(GetWarningMsg(col, item.get('type', ''), + sys.stderr.write( + GetWarningMsg(col, item.get('type', ''), item.get('file', ''), item.get('line', 0), item.get('msg', 'message'))) print