]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scripts: coccicheck: warn on unset debug file
authorBenjamin Philip <benjamin.philip495@gmail.com>
Tue, 6 Jan 2026 19:08:35 +0000 (00:38 +0530)
committerJulia Lawall <Julia.Lawall@inria.fr>
Sat, 21 Feb 2026 16:22:30 +0000 (17:22 +0100)
coccicheck prints debug logs to stdout unless a debug file has been set.
This makes it hard to read coccinelle's suggested changes, especially
for someone new to coccicheck.

From this commit, we warn about this behaviour from within the script on
an unset debug file. Explicitly setting the debug file to /dev/null
suppresses the warning while keeping the default.

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
scripts/coccicheck

index 2efb74afef2b8e68db5bed2fc59037e27e9818f7..8dd766009de18b139e5ec2ca639348089a79d770 100755 (executable)
@@ -260,6 +260,11 @@ coccinelle () {
 }
 
 if [ "$DEBUG_FILE" = "" ]; then
+    echo 'You have not explicitly specified the debug file to use.'
+    echo 'Using default "/dev/null" as debug file.'
+    echo 'Debug logs will be printed to stdout.'
+    echo 'You can specify the debug file with "make coccicheck DEBUG_FILE=<debug_file>"'
+    echo ''
     DEBUG_FILE="/dev/null"
 fi