linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] Trivial fixes in the smatch tree
@ 2025-06-20 22:38 Bhaskar Chowdhury
  2025-06-20 22:38 ` [PATCH 1/9] Replace pipes with a binary for cpu core count Bhaskar Chowdhury
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Bhaskar Chowdhury @ 2025-06-20 22:38 UTC (permalink / raw)
  To: dan.carpenter; +Cc: Bhaskar Chowdhury, linux-kernel

This is a human being with flesh and blood ...not stupid bot or idiotic AI..

Dan,

Could please pick up these changes to the tree, if and only if, these are
viable.

Bhaskar Chowdhury (9):
  Replace pipes with a binary for cpu core count
  Looks nicer in usage output without the full path of the script
  Eliminate the full path to the script in usage output
  Doing it for the consistency in the tree,eliminating the full path to
    the script
  Again, for the consistency, eliminate full path to the script
  Trivial fixup to take away the full path of the script
  Took away the full path to the script
  Usage shows without the full path to the script
  Trivial changes,usage text show scriptname without path,and few of
    them use nproc binary to show cpu core

 smatch_scripts/build_generic_data.sh        | 2 +-
 smatch_scripts/build_kernel_data.sh         | 2 +-
 smatch_scripts/filter_kernel_deref_check.sh | 2 +-
 smatch_scripts/find_null_params.sh          | 4 ++--
 smatch_scripts/gen_allocation_list.sh       | 2 +-
 smatch_scripts/gen_bit_shifters.sh          | 2 +-
 smatch_scripts/gen_dma_funcs.sh             | 2 +-
 smatch_scripts/gen_implicit_dependencies.sh | 2 +-
 smatch_scripts/gen_no_return_funcs.sh       | 2 +-
 smatch_scripts/gen_puts_list.sh             | 2 +-
 smatch_scripts/gen_rosenberg_funcs.sh       | 2 +-
 smatch_scripts/gen_sizeof_param.sh          | 2 +-
 smatch_scripts/gen_unwind_functions.sh      | 2 +-
 smatch_scripts/kpatch.sh                    | 2 +-
 smatch_scripts/show_errs.sh                 | 2 +-
 smatch_scripts/show_ifs.sh                  | 2 +-
 smatch_scripts/show_unreachable.sh          | 2 +-
 smatch_scripts/summarize_errs.sh            | 2 +-
 smatch_scripts/test_generic.sh              | 4 ++--
 smatch_scripts/test_kernel.sh               | 4 ++--
 smatch_scripts/whitespace_only.sh           | 4 ++--
 smatch_scripts/wine_checker.sh              | 4 ++--
 22 files changed, 27 insertions(+), 27 deletions(-)

--
2.46.3


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/9] Replace pipes with a binary for cpu core count
  2025-06-20 22:38 [PATCH 0/9] Trivial fixes in the smatch tree Bhaskar Chowdhury
@ 2025-06-20 22:38 ` Bhaskar Chowdhury
  2025-06-20 22:38 ` [PATCH 2/9] Looks nicer in usage output without the full path of the script Bhaskar Chowdhury
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Bhaskar Chowdhury @ 2025-06-20 22:38 UTC (permalink / raw)
  To: dan.carpenter; +Cc: Bhaskar Chowdhury, linux-kernel

Change the piped series with nproc binary,hopefully for better readability

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 smatch_scripts/build_generic_data.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/smatch_scripts/build_generic_data.sh b/smatch_scripts/build_generic_data.sh
index b18ceff8320c..c88ad3fcfc0f 100755
--- a/smatch_scripts/build_generic_data.sh
+++ b/smatch_scripts/build_generic_data.sh
@@ -3,7 +3,7 @@
 # This is a generic script to parse --info output.  For the kernel, don't use
 # this script, use build_kernel_data.sh instead.

-NR_CPU=$(cat /proc/cpuinfo | grep ^processor | wc -l)
+NR_CPU=$(nproc)
 SCRIPT_DIR=$(dirname $0)
 DATA_DIR=smatch_data
 PROJECT=smatch_generic
--
2.46.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/9] Looks nicer in usage output without the full path of the script
  2025-06-20 22:38 [PATCH 0/9] Trivial fixes in the smatch tree Bhaskar Chowdhury
  2025-06-20 22:38 ` [PATCH 1/9] Replace pipes with a binary for cpu core count Bhaskar Chowdhury
@ 2025-06-20 22:38 ` Bhaskar Chowdhury
  2025-06-20 22:38 ` [PATCH 3/9] Eliminate the full path to the script in usage output Bhaskar Chowdhury
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Bhaskar Chowdhury @ 2025-06-20 22:38 UTC (permalink / raw)
  To: dan.carpenter; +Cc: Bhaskar Chowdhury, linux-kernel

Add basename to scriptname for the clean look of the output.

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 smatch_scripts/build_kernel_data.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/smatch_scripts/build_kernel_data.sh b/smatch_scripts/build_kernel_data.sh
index 87f1f0639c55..c338da6e43e4 100755
--- a/smatch_scripts/build_kernel_data.sh
+++ b/smatch_scripts/build_kernel_data.sh
@@ -6,7 +6,7 @@ PROJECT=kernel

 function usage {
     echo
-    echo "Usage:  $0"
+    echo "Usage:  $(basename $0)"
     echo "Updates the smatch_data/ directory and builds the smatch database"
     echo
     exit 1
--
2.46.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/9] Eliminate the full path to the script in usage output
  2025-06-20 22:38 [PATCH 0/9] Trivial fixes in the smatch tree Bhaskar Chowdhury
  2025-06-20 22:38 ` [PATCH 1/9] Replace pipes with a binary for cpu core count Bhaskar Chowdhury
  2025-06-20 22:38 ` [PATCH 2/9] Looks nicer in usage output without the full path of the script Bhaskar Chowdhury
@ 2025-06-20 22:38 ` Bhaskar Chowdhury
  2025-06-20 22:38 ` [PATCH 4/9] Doing it for the consistency in the tree,eliminating the full path to the script Bhaskar Chowdhury
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Bhaskar Chowdhury @ 2025-06-20 22:38 UTC (permalink / raw)
  To: dan.carpenter; +Cc: Bhaskar Chowdhury, linux-kernel

Clean to the usage outputted text without full path of the script

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 smatch_scripts/filter_kernel_deref_check.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/smatch_scripts/filter_kernel_deref_check.sh b/smatch_scripts/filter_kernel_deref_check.sh
index c70d7994ead9..88071a464c45 100755
--- a/smatch_scripts/filter_kernel_deref_check.sh
+++ b/smatch_scripts/filter_kernel_deref_check.sh
@@ -2,7 +2,7 @@

 file=$1
 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 <file with smatch messages>"
+	echo "Usage:  $(basename $0) <file with smatch messages>"
     exit 1
 fi

--
2.46.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/9] Doing it for the consistency in the tree,eliminating the full path to the script
  2025-06-20 22:38 [PATCH 0/9] Trivial fixes in the smatch tree Bhaskar Chowdhury
                   ` (2 preceding siblings ...)
  2025-06-20 22:38 ` [PATCH 3/9] Eliminate the full path to the script in usage output Bhaskar Chowdhury
@ 2025-06-20 22:38 ` Bhaskar Chowdhury
  2025-06-27 19:07   ` Dan Carpenter
  2025-06-20 22:38 ` [PATCH 5/9] Again, for the consistency, eliminate " Bhaskar Chowdhury
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 11+ messages in thread
From: Bhaskar Chowdhury @ 2025-06-20 22:38 UTC (permalink / raw)
  To: dan.carpenter; +Cc: Bhaskar Chowdhury, linux-kernel

Just try to making things consistent across the tree by eliminating full path
to the script.

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 smatch_scripts/find_null_params.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/smatch_scripts/find_null_params.sh b/smatch_scripts/find_null_params.sh
index 9e39146d2d40..a78eb7623fb4 100755
--- a/smatch_scripts/find_null_params.sh
+++ b/smatch_scripts/find_null_params.sh
@@ -3,7 +3,7 @@
 file=$1

 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 <file with smatch messages>"
+	echo "Usage:  $(basename $0) <file with smatch messages>"
     exit 1
 fi

@@ -13,7 +13,7 @@ cat null_calls.txt unchecked | sort | uniq -d > null_params.txt
 IFS="
 "
 for i in $(cat null_params.txt) ; do
-	grep "$i" $file | grep -w undefined
+	grep "$i" $file | grep -w undefined
 done


--
2.46.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/9] Again, for the consistency, eliminate full path to the script
  2025-06-20 22:38 [PATCH 0/9] Trivial fixes in the smatch tree Bhaskar Chowdhury
                   ` (3 preceding siblings ...)
  2025-06-20 22:38 ` [PATCH 4/9] Doing it for the consistency in the tree,eliminating the full path to the script Bhaskar Chowdhury
@ 2025-06-20 22:38 ` Bhaskar Chowdhury
  2025-06-20 22:38 ` [PATCH 6/9] Trivial fixup to take away the full path of " Bhaskar Chowdhury
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Bhaskar Chowdhury @ 2025-06-20 22:38 UTC (permalink / raw)
  To: dan.carpenter; +Cc: Bhaskar Chowdhury, linux-kernel

Just for the cleanliness.

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 smatch_scripts/gen_allocation_list.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/smatch_scripts/gen_allocation_list.sh b/smatch_scripts/gen_allocation_list.sh
index 20175624bd64..3dac0bc0b0a8 100755
--- a/smatch_scripts/gen_allocation_list.sh
+++ b/smatch_scripts/gen_allocation_list.sh
@@ -4,7 +4,7 @@ file=$1
 project=$(echo "$2" | cut -d = -f 2)

 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 <file with smatch messages> -p=<project>"
+	echo "Usage:  $(basename $0) <file with smatch messages> -p=<project>"
     exit 1
 fi

--
2.46.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 6/9] Trivial fixup to take away the full path of the script
  2025-06-20 22:38 [PATCH 0/9] Trivial fixes in the smatch tree Bhaskar Chowdhury
                   ` (4 preceding siblings ...)
  2025-06-20 22:38 ` [PATCH 5/9] Again, for the consistency, eliminate " Bhaskar Chowdhury
@ 2025-06-20 22:38 ` Bhaskar Chowdhury
  2025-06-20 22:38 ` [PATCH 7/9] Took away the full path to " Bhaskar Chowdhury
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Bhaskar Chowdhury @ 2025-06-20 22:38 UTC (permalink / raw)
  To: dan.carpenter; +Cc: Bhaskar Chowdhury, linux-kernel

Just for the cleanliness.Full path to the script removed.

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 smatch_scripts/gen_bit_shifters.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/smatch_scripts/gen_bit_shifters.sh b/smatch_scripts/gen_bit_shifters.sh
index 98fa30ca205b..53300345a3e0 100755
--- a/smatch_scripts/gen_bit_shifters.sh
+++ b/smatch_scripts/gen_bit_shifters.sh
@@ -4,7 +4,7 @@ file=$1
 project=$(echo "$2" | cut -d = -f 2)

 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 <file with smatch messages> -p=<project>"
+	echo "Usage:  $(basename $0) <file with smatch messages> -p=<project>"
     exit 1
 fi

--
2.46.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 7/9] Took away the full path to the script
  2025-06-20 22:38 [PATCH 0/9] Trivial fixes in the smatch tree Bhaskar Chowdhury
                   ` (5 preceding siblings ...)
  2025-06-20 22:38 ` [PATCH 6/9] Trivial fixup to take away the full path of " Bhaskar Chowdhury
@ 2025-06-20 22:38 ` Bhaskar Chowdhury
  2025-06-20 22:38 ` [PATCH 8/9] Usage shows without " Bhaskar Chowdhury
  2025-06-20 22:38 ` [PATCH 9/9] Trivial changes,usage text show scriptname without path,and few of them use nproc binary to show cpu core Bhaskar Chowdhury
  8 siblings, 0 replies; 11+ messages in thread
From: Bhaskar Chowdhury @ 2025-06-20 22:38 UTC (permalink / raw)
  To: dan.carpenter; +Cc: Bhaskar Chowdhury, linux-kernel

Eliminate full to the script.

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 smatch_scripts/gen_dma_funcs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/smatch_scripts/gen_dma_funcs.sh b/smatch_scripts/gen_dma_funcs.sh
index 7346963b8529..1a3fc5f0d612 100755
--- a/smatch_scripts/gen_dma_funcs.sh
+++ b/smatch_scripts/gen_dma_funcs.sh
@@ -4,7 +4,7 @@ file=$1
 project=$(echo "$2" | cut -d = -f 2)

 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 <file with smatch messages> -p=<project>"
+	echo "Usage:  $(basename $0) <file with smatch messages> -p=<project>"
     exit 1
 fi

--
2.46.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 8/9] Usage shows without the full path to the script
  2025-06-20 22:38 [PATCH 0/9] Trivial fixes in the smatch tree Bhaskar Chowdhury
                   ` (6 preceding siblings ...)
  2025-06-20 22:38 ` [PATCH 7/9] Took away the full path to " Bhaskar Chowdhury
@ 2025-06-20 22:38 ` Bhaskar Chowdhury
  2025-06-20 22:38 ` [PATCH 9/9] Trivial changes,usage text show scriptname without path,and few of them use nproc binary to show cpu core Bhaskar Chowdhury
  8 siblings, 0 replies; 11+ messages in thread
From: Bhaskar Chowdhury @ 2025-06-20 22:38 UTC (permalink / raw)
  To: dan.carpenter; +Cc: Bhaskar Chowdhury, linux-kernel

Eliminate full path to the script.

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 smatch_scripts/gen_implicit_dependencies.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/smatch_scripts/gen_implicit_dependencies.sh b/smatch_scripts/gen_implicit_dependencies.sh
index bb6217437507..d6e21bf63bd6 100755
--- a/smatch_scripts/gen_implicit_dependencies.sh
+++ b/smatch_scripts/gen_implicit_dependencies.sh
@@ -4,7 +4,7 @@ file=$1
 project=$(echo "$2" | cut -d = -f 2)

 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 <file with smatch messages> -p=<project>"
+	echo "Usage:  $(basename $0) <file with smatch messages> -p=<project>"
     exit 1
 fi

--
2.46.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 9/9]  Trivial changes,usage text show scriptname without path,and few of them use nproc binary to show cpu core
  2025-06-20 22:38 [PATCH 0/9] Trivial fixes in the smatch tree Bhaskar Chowdhury
                   ` (7 preceding siblings ...)
  2025-06-20 22:38 ` [PATCH 8/9] Usage shows without " Bhaskar Chowdhury
@ 2025-06-20 22:38 ` Bhaskar Chowdhury
  8 siblings, 0 replies; 11+ messages in thread
From: Bhaskar Chowdhury @ 2025-06-20 22:38 UTC (permalink / raw)
  To: dan.carpenter; +Cc: Bhaskar Chowdhury, linux-kernel

Trivial fixes for the script name to show up in help/usage test without full
pathname and some of them have CPU core variable via nproc.

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 smatch_scripts/gen_no_return_funcs.sh  | 2 +-
 smatch_scripts/gen_puts_list.sh        | 2 +-
 smatch_scripts/gen_rosenberg_funcs.sh  | 2 +-
 smatch_scripts/gen_sizeof_param.sh     | 2 +-
 smatch_scripts/gen_unwind_functions.sh | 2 +-
 smatch_scripts/kpatch.sh               | 2 +-
 smatch_scripts/show_errs.sh            | 2 +-
 smatch_scripts/show_ifs.sh             | 2 +-
 smatch_scripts/show_unreachable.sh     | 2 +-
 smatch_scripts/summarize_errs.sh       | 2 +-
 smatch_scripts/test_generic.sh         | 4 ++--
 smatch_scripts/test_kernel.sh          | 4 ++--
 smatch_scripts/whitespace_only.sh      | 4 ++--
 smatch_scripts/wine_checker.sh         | 4 ++--
 14 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/smatch_scripts/gen_no_return_funcs.sh b/smatch_scripts/gen_no_return_funcs.sh
index 713456c04aac..c5e16cc1008a 100755
--- a/smatch_scripts/gen_no_return_funcs.sh
+++ b/smatch_scripts/gen_no_return_funcs.sh
@@ -4,7 +4,7 @@ file=$1
 project=$(echo "$2" | cut -d = -f 2)

 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 <file with smatch messages> -p=<project>"
+	echo "Usage:  $(basename $0) <file with smatch messages> -p=<project>"
     exit 1
 fi

diff --git a/smatch_scripts/gen_puts_list.sh b/smatch_scripts/gen_puts_list.sh
index 5a877aeb8423..32eda6d52e42 100755
--- a/smatch_scripts/gen_puts_list.sh
+++ b/smatch_scripts/gen_puts_list.sh
@@ -4,7 +4,7 @@ file=$1
 project=$(echo "$2" | cut -d = -f 2)

 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 <file with smatch messages> -p=<project>"
+	echo "Usage:  $(basename $0) <file with smatch messages> -p=<project>"
     exit 1
 fi

diff --git a/smatch_scripts/gen_rosenberg_funcs.sh b/smatch_scripts/gen_rosenberg_funcs.sh
index 0152ba9c1192..cfc0c9a8a40d 100755
--- a/smatch_scripts/gen_rosenberg_funcs.sh
+++ b/smatch_scripts/gen_rosenberg_funcs.sh
@@ -4,7 +4,7 @@ file=$1
 project=$(echo "$2" | cut -d = -f 2)

 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 <file with smatch messages> -p=<project>"
+	echo "Usage:  $(basename $0) <file with smatch messages> -p=<project>"
     exit 1
 fi

diff --git a/smatch_scripts/gen_sizeof_param.sh b/smatch_scripts/gen_sizeof_param.sh
index 8f4e5f7493c0..653f39dae61e 100755
--- a/smatch_scripts/gen_sizeof_param.sh
+++ b/smatch_scripts/gen_sizeof_param.sh
@@ -4,7 +4,7 @@ file=$1
 project=$(echo "$2" | cut -d = -f 2)

 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 <file with smatch messages> -p=<project>"
+	echo "Usage:  $(basename $0) <file with smatch messages> -p=<project>"
     exit 1
 fi

diff --git a/smatch_scripts/gen_unwind_functions.sh b/smatch_scripts/gen_unwind_functions.sh
index ae8504902018..dc7d66fa0bf1 100755
--- a/smatch_scripts/gen_unwind_functions.sh
+++ b/smatch_scripts/gen_unwind_functions.sh
@@ -4,7 +4,7 @@ file=$1
 project=$(echo "$2" | cut -d = -f 2)

 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 <file with smatch messages> -p=<project>"
+	echo "Usage:  $(basename $0) <file with smatch messages> -p=<project>"
     exit 1
 fi

diff --git a/smatch_scripts/kpatch.sh b/smatch_scripts/kpatch.sh
index 66cef9581ca0..7ee229a0bfbf 100755
--- a/smatch_scripts/kpatch.sh
+++ b/smatch_scripts/kpatch.sh
@@ -4,7 +4,7 @@ TMP_DIR=/tmp

 help()
 {
-    echo "Usage: $0 [--no-compile|--amend] <filename>"
+	echo "Usage: $(basename $0) [--no-compile|--amend] <filename>"
     echo "You must be at the base of the kernel tree to run this."
     exit 1
 }
diff --git a/smatch_scripts/show_errs.sh b/smatch_scripts/show_errs.sh
index bc6930ffa245..2f3983abab45 100755
--- a/smatch_scripts/show_errs.sh
+++ b/smatch_scripts/show_errs.sh
@@ -15,7 +15,7 @@ done
 file=$1
 [ "$file" = "" ] && [ -e err-list ] && file=err-list
 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 [-C <lines>] [-b] [-k] <file with smatch messages>"
+	echo "Usage:  $(basename $0) [-C <lines>] [-b] [-k] <file with smatch messages>"
     echo "  -C <lines>:  Print <lines> of context"
     exit 1
 fi
diff --git a/smatch_scripts/show_ifs.sh b/smatch_scripts/show_ifs.sh
index 4f93ca5fa285..8b84606250b5 100755
--- a/smatch_scripts/show_ifs.sh
+++ b/smatch_scripts/show_ifs.sh
@@ -9,7 +9,7 @@ fi

 file=$1
 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 [-C <lines of context>] <file with smatch messages>"
+	echo "Usage:  $(basename $0) [-C <lines of context>] <file with smatch messages>"
     exit 1
 fi

diff --git a/smatch_scripts/show_unreachable.sh b/smatch_scripts/show_unreachable.sh
index 7402615dc670..e866760c6726 100755
--- a/smatch_scripts/show_unreachable.sh
+++ b/smatch_scripts/show_unreachable.sh
@@ -24,7 +24,7 @@ done

 file=$1
 if [[ "$file" = "" ]] ; then
-    echo "Usage:  $0 [-C <lines>] [-b] [-k] <file with smatch messages>"
+	echo "Usage:  $(basename $0) [-C <lines>] [-b] [-k] <file with smatch messages>"
     echo "  -C <lines>:  Print <lines> of context"
     echo "  -b        :  Ignore unreachable break statements"
     echo "  -k        :  Ignore some kernel defines"
diff --git a/smatch_scripts/summarize_errs.sh b/smatch_scripts/summarize_errs.sh
index b958a015ddf2..a444fa267495 100755
--- a/smatch_scripts/summarize_errs.sh
+++ b/smatch_scripts/summarize_errs.sh
@@ -2,7 +2,7 @@

 print_help()
 {
-    echo "usage: $0 <warning file>"
+	echo "usage: $(basename $0) <warning file>"
     exit 1;
 }

diff --git a/smatch_scripts/test_generic.sh b/smatch_scripts/test_generic.sh
index 9fbd1caf4b29..5ad08f4fa135 100755
--- a/smatch_scripts/test_generic.sh
+++ b/smatch_scripts/test_generic.sh
@@ -1,12 +1,12 @@
 #!/bin/bash

-NR_CPU=$(cat /proc/cpuinfo | grep ^processor | wc -l)
+NR_CPU=$(nproc)
 TARGET=""
 WLOG="smatch_warns.txt"
 LOG="smatch_compile.warns"
 function usage {
     echo
-    echo "Usage:  $0 [smatch options]"
+    echo "Usage: $(basename $0) [smatch options]"
     echo "Compiles the kernel with -j${NR_CPU}"
     echo " available options:"
     echo "	--endian          : enable endianness check"
diff --git a/smatch_scripts/test_kernel.sh b/smatch_scripts/test_kernel.sh
index 9d25ce9c1ed3..9a0eb482a2f6 100755
--- a/smatch_scripts/test_kernel.sh
+++ b/smatch_scripts/test_kernel.sh
@@ -2,13 +2,13 @@

 set -e

-NR_CPU=$(cat /proc/cpuinfo | grep ^processor | wc -l)
+NR_CPU=$(nproc)
 TARGET="bzImage modules"
 WLOG="smatch_warns.txt"
 LOG="smatch_compile.warns"
 function usage {
     echo
-    echo "Usage:  $0 [smatch options]"
+    echo "Usage: $(basename $0) [smatch options]"
     echo "Compiles the kernel with -j${NR_CPU}"
     echo " available options:"
     echo "	--endian          : enable endianness check"
diff --git a/smatch_scripts/whitespace_only.sh b/smatch_scripts/whitespace_only.sh
index 975e6571e1e7..e72afb67a519 100755
--- a/smatch_scripts/whitespace_only.sh
+++ b/smatch_scripts/whitespace_only.sh
@@ -2,7 +2,7 @@

 usage()
 {
-    echo "usage:  $0 <patch file>"
+	echo "usage:  $(basename $0) <patch file>"
     exit 1
 }

@@ -84,7 +84,7 @@ for file in $files ; do
 	echo '!!                            !!'
 	echo '!!#$%@$%@^@#$^@#%@$%@$%@#%$@#%!!'

-	diff -u $before $after
+	diff -u $before $after
     fi
     rm -f $before $after $tmpfile
 done
diff --git a/smatch_scripts/wine_checker.sh b/smatch_scripts/wine_checker.sh
index 79b4faa51a07..5825cf9e8a13 100755
--- a/smatch_scripts/wine_checker.sh
+++ b/smatch_scripts/wine_checker.sh
@@ -1,7 +1,7 @@
 #!/bin/bash

 function usage {
-    echo "Usage:  $0 [--sparse][--valgrind][--debug] path/to/file.c"
+	echo "Usage:  $(basename $0) [--sparse][--valgrind][--debug] path/to/file.c"
     exit 1
 }

@@ -14,7 +14,7 @@ else
     echo "Smatch binary not found."
     exit 1
 fi
-
+
 POST=""
 WINE_ARGS="-p=wine --full-path -D__i386__"

--
2.46.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/9] Doing it for the consistency in the tree,eliminating the full path to the script
  2025-06-20 22:38 ` [PATCH 4/9] Doing it for the consistency in the tree,eliminating the full path to the script Bhaskar Chowdhury
@ 2025-06-27 19:07   ` Dan Carpenter
  0 siblings, 0 replies; 11+ messages in thread
From: Dan Carpenter @ 2025-06-27 19:07 UTC (permalink / raw)
  To: Bhaskar Chowdhury; +Cc: linux-kernel

On Sat, Jun 21, 2025 at 04:08:53AM +0530, Bhaskar Chowdhury wrote:
> Just try to making things consistent across the tree by eliminating full path
> to the script.
> 
> Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
> ---
>  smatch_scripts/find_null_params.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/smatch_scripts/find_null_params.sh b/smatch_scripts/find_null_params.sh
> index 9e39146d2d40..a78eb7623fb4 100755
> --- a/smatch_scripts/find_null_params.sh
> +++ b/smatch_scripts/find_null_params.sh
> @@ -3,7 +3,7 @@
>  file=$1
> 
>  if [[ "$file" = "" ]] ; then
> -    echo "Usage:  $0 <file with smatch messages>"
> +	echo "Usage:  $(basename $0) <file with smatch messages>"

I don't love tab indents for bash scripts.  I know that the kernel does
this for scripts but I don't love it there either.  So I've been hand
editing these patches.  It's easy for me to hand edit these in my email
client so no worries.

>      exit 1
>  fi
> 
> @@ -13,7 +13,7 @@ cat null_calls.txt unchecked | sort | uniq -d > null_params.txt
>  IFS="
>  "
>  for i in $(cat null_params.txt) ; do
> -	grep "$i" $file | grep -w undefined
> +	grep "$i" $file | grep -w undefined

In this case I think you were removing a space from the end of the line
but somehow your email client seems to have deleted it so the patch
didn't apply.  I did this manually as well, but you may want to fix that.

Anyway, all of these are applied now.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-06-27 19:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-20 22:38 [PATCH 0/9] Trivial fixes in the smatch tree Bhaskar Chowdhury
2025-06-20 22:38 ` [PATCH 1/9] Replace pipes with a binary for cpu core count Bhaskar Chowdhury
2025-06-20 22:38 ` [PATCH 2/9] Looks nicer in usage output without the full path of the script Bhaskar Chowdhury
2025-06-20 22:38 ` [PATCH 3/9] Eliminate the full path to the script in usage output Bhaskar Chowdhury
2025-06-20 22:38 ` [PATCH 4/9] Doing it for the consistency in the tree,eliminating the full path to the script Bhaskar Chowdhury
2025-06-27 19:07   ` Dan Carpenter
2025-06-20 22:38 ` [PATCH 5/9] Again, for the consistency, eliminate " Bhaskar Chowdhury
2025-06-20 22:38 ` [PATCH 6/9] Trivial fixup to take away the full path of " Bhaskar Chowdhury
2025-06-20 22:38 ` [PATCH 7/9] Took away the full path to " Bhaskar Chowdhury
2025-06-20 22:38 ` [PATCH 8/9] Usage shows without " Bhaskar Chowdhury
2025-06-20 22:38 ` [PATCH 9/9] Trivial changes,usage text show scriptname without path,and few of them use nproc binary to show cpu core Bhaskar Chowdhury

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).