From nobody Sat Feb 7 06:13:45 2026 Received: from omta40.uswest2.a.cloudfilter.net (omta40.uswest2.a.cloudfilter.net [35.89.44.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF21538E132 for ; Wed, 4 Feb 2026 21:38:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.89.44.39 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770241113; cv=none; b=PJ+M6taDOYnTqoaWUMIB5f67fOQ2fgctgJTCKF7X4dwp8Lw18yMdYKNEm6MieaI5WMvw4LkbG4bLlIil8a/5laRRCAYiRC5pwZ/ybX5HIfkHf/dSiO2B4OdoVxgoL7zxiAdBt78zBR53Eoj+TqzoB8nfsUkM1o0xmtFI1CNHCrU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770241113; c=relaxed/simple; bh=TwPOnV70bAcVHUXmUNl4ftBodgbQAmwoj9DTD3HvHQM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rz9pa9Gzhxu8EAEzHlOZFlsrPUz5GKgfdt8f9PHBpx6NMKCy8hZYGKchRfbFdXS+Im72dnG37d4mu5CTsae4ILish7RTiLNdgfzDk2GiTVEcwCHXqZL2YJm+2bHCYHRW4EVs8vIREq/juYt9VwyzhC+zpl0BgoG4wqBx6hKkxbs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=sony.com; spf=fail smtp.mailfrom=sony.com; arc=none smtp.client-ip=35.89.44.39 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=sony.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=sony.com Received: from eig-obgw-6006b.ext.cloudfilter.net ([10.0.30.211]) by cmsmtp with ESMTPS id ni2GvdHaEaPqLnka0viO1p; Wed, 04 Feb 2026 21:38:32 +0000 Received: from host2044.hostmonster.com ([67.20.76.238]) by cmsmtp with ESMTPS id nkZzveK8tvXvHnka0vKwgr; Wed, 04 Feb 2026 21:38:32 +0000 X-Authority-Analysis: v=2.4 cv=e4IGSbp/ c=1 sm=1 tr=0 ts=6983bc58 a=O1AQXT3IpLm5MaED65xONQ==:117 a=uc9KWs4yn0V/JYYSH7YHpg==:17 a=HzLeVaNsDn8A:10 a=z6gsHLkEAAAA:8 a=LSK2znk9xkmv_uyTUncA:9 a=iekntanDnrheIxGr1pkv:22 Received: from [66.118.46.62] (port=38736 helo=timdesk..) by host2044.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.99.1) (envelope-from ) id 1vnkZx-00000000Bok-46tk; Wed, 04 Feb 2026 14:38:30 -0700 From: Tim Bird To: apw@canonical.com, joe@perches.com, dwaipayanray1@gmail.com, lukas.bulwahn@gmail.com Cc: linux-spdx@vger.kernel.org, linux-kernel@vger.kernel.org, Tim Bird Subject: [PATCH] checkpatch: add check for missing */ in spdx line Date: Wed, 4 Feb 2026 14:38:23 -0700 Message-ID: <20260204213823.1754560-1-tim.bird@sony.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2044.hostmonster.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sony.com X-BWhitelist: no X-Source-IP: 66.118.46.62 X-Source-L: No X-Exim-ID: 1vnkZx-00000000Bok-46tk X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (timdesk..) [66.118.46.62]:38736 X-Source-Auth: tim@bird.org X-Email-Count: 22 X-Org: HG=bhshared_hm;ORG=bluehost; X-Source-Cap: YmlyZG9yZztiaXJkb3JnO2hvc3QyMDQ0Lmhvc3Rtb25zdGVyLmNvbQ== X-Local-Domain: no X-CMAE-Envelope: MS4xfAmFHt1RfMDRgSF4/F3ro+2Y64eNpSQmeCBd1cfYaTSX7SB3523AHQ55bLGRbfXMy06QScefd0bdiB52dvU9Hh/9iYK/gu1Q8Baaycn8q3VqGnlHCXWT WGHbJE7Z6rzUy5Q/o8BP5VylCLeidwZ54ISMKFhUeZwAWfcp8Hshph0v+5vQF/dF4vzW7nby1RTr6JzbRaUyeB1/zWgixEmkaqc= Content-Type: text/plain; charset="utf-8" Add an explicit check for leading /* but missing */ to avoid a malformed SPDX line. In many cases an SPDX-License-Identifier line immediately precedes another C-style comment. In that case, if the SPDX line starts with '/*' but is missing the closing '*/', the compiler may not catch it (the leading '/*' on the next line and the rest of the header comment is just treated as part of the SPDX comment). Signed-off-by: Tim Bird --- scripts/checkpatch.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c0250244cf7a..1cc3fd5e72af 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3794,6 +3794,11 @@ sub process { WARN("SPDX_LICENSE_TAG", "Improper SPDX comment style for '$realfile', please use '$comme= nt' instead\n" . $herecurr); } + if ($comment eq '/*' && + $rawline !~ m@\*/@) { + WARN("SPDX_LICENSE_TAG", + "Improper SPDX comment style for '$realfile', missing closing '*= /'\n" . $herecurr); + } =20 if ($comment !~ /^$/ && $rawline !~ m@^\+\Q$comment\E SPDX-License-Identifier: @) { --=20 2.43.0