Skip to contentSkip to conversation

prepare-kernel.sh: Remove dead variable

PATCH Applied Richard Weinberger 2 participants 5 messages Apr 4, 2024 – Apr 10, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 prepare-kernel.sh: Remove dead variable

linux_out got added in 2006 via 68d0bf171 ("Allow configuration over a kernel output tree") but was never in use.

---
 scripts/prepare-kernel.sh | 1 -
 1 file changed, 1 deletion(-)
scripts/prepare-kernel.sh +0 -1
index 64e2484e1..d50680dba 100755
@@ -241,7 +241,6 @@ while test x$linux_tree = x; do
 done
 
 linux_tree=`cd $linux_tree && pwd`
-linux_out=$linux_tree
 
 if test \! -r $linux_tree/Makefile; then
    echo "$me: $linux_tree is not a valid Linux kernel tree" >&2
Signature · 1 line
2.35.3
#1 lore raw

PATCH 2/2 prepare-kernel.sh: Fix typo in variable name

recursive_opts was added via
3f4c56c74 ("fix prepare-kernel for 2.4 and mindepth argument") but never worked as expected, it's recursive_opt, without "s".

---
 scripts/prepare-kernel.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/prepare-kernel.sh +1 -1
index d50680dba..0b11eca66 100755
@@ -94,7 +94,7 @@ patch_link() {
               link_makefiles_opt="-name Makefile -o"
            fi
            if test x$recursive = xr; then
-	       recursive_opts="-mindepth 1"
+	       recursive_opt="-mindepth 1"
 	       dir_opt="-type d -o"
            else
 	       recursive_opt="-maxdepth 1"
Signature · 1 line
2.35.3
#2 lore raw

Re: [PATCH 2/2] prepare-kernel.sh: Fix typo in variable name

Quoted 4 lines · Richard Weinberger

recursive_opts was added via
3f4c56c74 ("fix prepare-kernel for 2.4 and mindepth argument") but never worked as expected, it's recursive_opt, without "s".

And what was the impact?

Looking at where recursive_opt is used, both cases specify additional constraint on file names that likely happen to exclude source and target directory names. Right?

Quoted 10 lines
---
 scripts/prepare-kernel.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/prepare-kernel.sh +0 -0
index d50680dba..0b11eca66 100755

scripts/prepare-kernel.sh patch_link() { · line 100

Quoted 8 lines
scripts/prepare-kernel.sh +1 -1
@@ -94,7 +94,7 @@ patch_link() {
               link_makefiles_opt="-name Makefile -o"
            fi
            if test x$recursive = xr; then
-	       recursive_opts="-mindepth 1"
+	       recursive_opt="-mindepth 1"
 	       dir_opt="-type d -o"
            else
 	       recursive_opt="-maxdepth 1"

Jan

Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
#3 lore raw

Re: [PATCH 2/2] prepare-kernel.sh: Fix typo in variable name

Quoted 6 lines · Jan Kiszka
Quoted 4 lines · Richard Weinberger

recursive_opts was added via
3f4c56c74 ("fix prepare-kernel for 2.4 and mindepth argument") but never worked as expected, it's recursive_opt, without "s".

Quoted 6 lines

And what was the impact?

Looking at where recursive_opt is used, both cases specify additional constraint on file names that likely happen to exclude source and target directory names. Right?

OK, applied with clarified impact (none).

Thanks,
Jan

Quoted 21 lines
Quoted 10 lines
---
 scripts/prepare-kernel.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/prepare-kernel.sh +0 -0
index d50680dba..0b11eca66 100755

scripts/prepare-kernel.sh patch_link() { · line 100

Quoted 8 lines
scripts/prepare-kernel.sh +1 -1
@@ -94,7 +94,7 @@ patch_link() {
               link_makefiles_opt="-name Makefile -o"
            fi
            if test x$recursive = xr; then
-	       recursive_opts="-mindepth 1"
+	       recursive_opt="-mindepth 1"
 	       dir_opt="-type d -o"
            else
 	       recursive_opt="-maxdepth 1"

Jan

Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
Applied
#4 lore raw
In reply to Richard Weinberger
Quoted 13 lines · Richard Weinberger

linux_out got added in 2006 via 68d0bf171 ("Allow configuration over a kernel output tree") but was never in use.

---
 scripts/prepare-kernel.sh | 1 -
 1 file changed, 1 deletion(-)
scripts/prepare-kernel.sh +0 -0
index 64e2484e1..d50680dba 100755

scripts/prepare-kernel.sh while test x$linux_tree = x; do · line 246

Quoted 7 lines
scripts/prepare-kernel.sh +0 -1
@@ -241,7 +241,6 @@ while test x$linux_tree = x; do
 done
 
 linux_tree=`cd $linux_tree && pwd`
-linux_out=$linux_tree
 
 if test \! -r $linux_tree/Makefile; then
    echo "$me: $linux_tree is not a valid Linux kernel tree" >&2

Thanks, applied.

Jan

Signature · 2 lines
Siemens AG, Technology
Linux Expert Center