With the modifcation now done, remove compatibility with ${srctree} not having the trailing slash. Signed-off-by: Elliott Mitchell <ehem+linux@xxxxxxx> --- --- scripts/coccicheck | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/coccicheck b/scripts/coccicheck index 0395b6f943d4..099ca7c7603b 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck @@ -81,7 +81,7 @@ command results in a shift count error.' else ONLINE=0 if [ "$KBUILD_EXTMOD" = "" ] ; then - OPTIONS="--dir $srctree $COCCIINCLUDE" + OPTIONS="--dir ${srctree}. $COCCIINCLUDE" else OPTIONS="--dir $KBUILD_EXTMOD $COCCIINCLUDE" fi @@ -210,7 +210,7 @@ coccinelle () { if [ $VERBOSE -ne 0 -a $ONLINE -eq 0 ] ; then - FILE=${COCCI#${srctree%/}/} + FILE=${COCCI#$srctree} echo "Processing `basename $COCCI`" echo "with option(s) \"$OPT\"" @@ -273,7 +273,7 @@ else fi if [ "$COCCI" = "" ] ; then - for f in `find $srctree/scripts/coccinelle/ -name '*.cocci' -type f | sort`; do + for f in `find ${srctree}scripts/coccinelle/ -name '*.cocci' -type f | sort`; do coccinelle $f done else -- 2.39.2