diff mbox series

[WIP,16/30] scripts/dtc: dtx_diff: include trailing slash in ${srctree} variable

Message ID e01aea1a01b9a269bb973384ead21a0d2f6b8065.1709508291.git.ehem+linux@m5p.com (mailing list archive)
State New, archived
Headers show
Series Adding trailing slash to $(*tree) | expand

Commit Message

Elliott Mitchell March 1, 2024, 11:26 p.m. UTC
If run under debugging this looks slightly nicer.  The net effect is
basically null though.

Signed-off-by: Elliott Mitchell <ehem+linux@m5p.com>
---
I'm unsure whether this is ever used directly on the command-line.
There might be a need to compensate for direct invocation, but I'm
unsure of the approach to choose for that.
---
 scripts/dtc/dtx_diff | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/scripts/dtc/dtx_diff b/scripts/dtc/dtx_diff
index f2bbde4bba86..e06778527751 100755
--- a/scripts/dtc/dtx_diff
+++ b/scripts/dtc/dtx_diff
@@ -139,10 +139,10 @@  compile_to_dts() {
 			echo "  >>\$ARCH<< is: >>${ARCH}<<"                  >&2
 		fi
 
-		if [ ! -d ${srctree}/arch/${ARCH} ] ; then
+		if [ ! -d ${srctree}arch/${ARCH} ] ; then
 			hint_given=1
 			echo ""                                              >&2
-			echo "  ${srctree}/arch/${ARCH}/ does not exist"     >&2
+			echo "  ${srctree}arch/${ARCH}/ does not exist"      >&2
 			echo "  Is \$ARCH='${ARCH}' correct?"                >&2
 			echo "  Possible fix: use '-s' option"               >&2
 
@@ -247,10 +247,6 @@  while [ $# -gt 0 ] ; do
 
 done
 
-if [ "${srctree}" = "" ] ; then
-	srctree="."
-fi
-
 if [ "${dtx_file_2}" != "" ]; then
 	cmd_diff=1
 fi
@@ -272,7 +268,7 @@  fi
 # -----  prefer dtc from linux kernel, allow fallback to dtc in $PATH
 
 if [ "${KBUILD_OUTPUT:0:2}" = ".." ] ; then
-	__KBUILD_OUTPUT="${srctree}/${KBUILD_OUTPUT}"
+	__KBUILD_OUTPUT="${srctree}${KBUILD_OUTPUT}"
 elif [ "${KBUILD_OUTPUT}" = "" ] ; then
 	__KBUILD_OUTPUT="."
 else
@@ -337,12 +333,12 @@  fi
 
 cpp_flags="\
 	-nostdinc                                  \
-	-I${srctree}/scripts/dtc/include-prefixes  \
+	-I${srctree}scripts/dtc/include-prefixes  \
 	-undef -D__DTS__"
 
 DTC="\
 	${DTC}                                     \
-	-i ${srctree}/scripts/dtc/include-prefixes \
+	-i ${srctree}scripts/dtc/include-prefixes \
 	-O dts -qq -f ${dtc_sort} ${annotate} -o -"