[PATCH 4/9] Doing it for the consistency in the tree,eliminating the full path to the script

Bhaskar Chowdhury posted 9 patches 3 months, 2 weeks ago
[PATCH 4/9] Doing it for the consistency in the tree,eliminating the full path to the script
Posted by Bhaskar Chowdhury 3 months, 2 weeks ago
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
Re: [PATCH 4/9] Doing it for the consistency in the tree,eliminating the full path to the script
Posted by Dan Carpenter 3 months, 1 week ago
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