Skip to contentSkip to conversation

fix missing 'sys' package

PATCH Superseded Kortan 2 participants 2 messages Sep 7, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Kortan

author
#0 lore raw

PATCH 1/1 fix missing 'sys' package

---
 scripts/clang-tools/gen_compile_commands.py | 1 +
 1 file changed, 1 insertion(+)
scripts/clang-tools/gen_compile_commands.py +1 -0
index 0033eedce003..1d1bde1fd45e 100755
@@ -13,6 +13,7 @@ import logging
 import os
 import re
 import subprocess
+import sys
 
 _DEFAULT_OUTPUT = 'compile_commands.json'
 _DEFAULT_LOG_LEVEL = 'WARNING'
Signature · 1 line
2.33.0
#1 lore raw

Hi Kortan,

Thank you for the patch! I have some comments inline.

The commit title/subject should have a prefix to it. You can see the prefix for this particular file by running:

$ git log --oneline --format=%s scripts/clang-tools/gen_compile_commands.py
gen_compile_commands: extract compiler command from a series of commands
gen_compile_commands: prune some directories
scripts/clang-tools: switch explicitly to Python 3
Makefile: Add clang-tidy and static analyzer support to makefile

So your commit title would be:

gen_compile_commands: fix missing 'sys' package

On Tue, Sep 07, 2021 at 05:43:36PM +0800, Kortan wrote:

There needs to be a message here. It is obvious once you look at the file that we call sys.exit() so we need the import but that needs to be explained up front here. checkpatch.pl would have warned you about this:

WARNING: Missing commit description - Add an appropriate one

total: 0 errors, 1 warnings, 7 lines checked

Otherwise, the change looks good to me. Please make these corrections and send a v2 of the patch, which can be done with the '-v#' flag to 'git format-patch' (e.g. '-v2' in this case).

Quoted 2 lines

---

Describe the diff between v1 and v2 here like:

v1 -> v2:

* Fix commit title

* Improve commit message

then be sure to also include Masahiro Yamada and the linux-kbuild mailing list as he will pick up the patch.

Masahiro Yamada <[email protected]>
[email protected]

Please use our new mailing list as well:

[email protected]

Cheers,
Nathan

Quoted 19 lines
 scripts/clang-tools/gen_compile_commands.py | 1 +
 1 file changed, 1 insertion(+)
scripts/clang-tools/gen_compile_commands.py +1 -0
index 0033eedce003..1d1bde1fd45e 100755
@@ -13,6 +13,7 @@ import logging
 import os
 import re
 import subprocess
+import sys
 
 _DEFAULT_OUTPUT = 'compile_commands.json'
 _DEFAULT_LOG_LEVEL = 'WARNING'
Signature · 1 line
2.33.0