From patchwork Fri Mar 1 23:50:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliott Mitchell X-Patchwork-Id: 13579990 Received: from mailhost.m5p.com (mailhost.m5p.com [74.104.188.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28EB133CE for ; Mon, 4 Mar 2024 02:47:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.104.188.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709520478; cv=none; b=W2k7cHGRqcvGuh4QglRg83aT2R66Q+/vRykPMn96jIRlFr7mCRnRbNzVyoi05fsvG0HH/aXsbOBy+fg9mtipiUoM/QlfDgQklLq/x2tys4fo1Wvrjbv9RuVab1ZhbjOwuSr+li0JImYk30fNAwC6iR+UCwnCsRnvK0HT3PsJGDU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709520478; c=relaxed/simple; bh=PTd8K4FFOvTBpIPDrrBxCB1FOvyN77hcvc15zjuVEfA=; h=Message-Id:In-Reply-To:References:From:Date:Subject:To:Cc; b=g/DtmruxuiktB2oaOc1TcHhiVlALaZMFbr5yP9tIh40huWtfGRsY8bIr5Cok0mY/thZEE82iKPXffRGOTdSCXwgrbRnVI3hvQZBaWvzt1PUxfz6IUbA4IHWaIcHhz9xZ0Z1Q6v8EFUiqxm5DofNbeBXM+peJKMG3eqGkwPL+2us= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=m5p.com; spf=pass smtp.mailfrom=m5p.com; arc=none smtp.client-ip=74.104.188.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=m5p.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=m5p.com Received: from m5p.com (mailhost.m5p.com [IPv6:2001:470:1f07:15ff:0:0:0:f7]) by mailhost.m5p.com (8.17.1/8.15.2) with ESMTPS id 4242j9vV022091 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 3 Mar 2024 21:45:15 -0500 (EST) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.17.1/8.15.2/Submit) id 4242j9o0022090; Sun, 3 Mar 2024 18:45:09 -0800 (PST) (envelope-from ehem) Message-Id: <8cc3f479d76cadf32a80cc4320f59f0c86ba4424.1709508292.git.ehem+linux@m5p.com> In-Reply-To: References: From: Elliott Mitchell Date: Fri, 1 Mar 2024 15:50:39 -0800 Subject: [WIP PATCH 25/30] scripts/coccicheck: modify to handle ${srctree} with trailing slash To: masahiroy@kernel.org, nathan@kernel.org, nicolas@fjasle.eu Cc: linux-kbuild@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: With the modifcation now done, remove compatibility with ${srctree} not having the trailing slash. Signed-off-by: Elliott Mitchell --- --- 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