Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2485952rdd; Fri, 12 Jan 2024 10:49:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsJlgK8VuUgLH6wvwN6ws47XtEuWGLE6RyRvZcOuK0Ns7CGgYNymx3Ubc/31yMxa/LEiMN X-Received: by 2002:a25:73c9:0:b0:dbe:d59a:20b2 with SMTP id o192-20020a2573c9000000b00dbed59a20b2mr1153395ybc.52.1705085359259; Fri, 12 Jan 2024 10:49:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705085359; cv=none; d=google.com; s=arc-20160816; b=HlPSNqb950ohuVsvh8lV+K1HLdqKEpkq3rvk1EU8Cp9fUhNjBuoAWNeQR9UUGo+ZOI bFJ2FAy9G5wpOxQm5PZJX25/nwHKciO/EyZQWR2M0Zm6+uzfpfrUASOVr5INdeZFiz7/ vb8LhFFBydiEk8mn0rLLpiExJFuWfhW+pOTqvWoI9aK/bMD2E+Xb86N55/EjlTfwW9ra NfBN8fm0N85gXDY89H5yS2MfrhtjN/aFaiCYKQEKXDPfUuwfSd4hTFkhM8Upk51xFuik f7wu9+goGJH8EuUBIw5nm431dxECs+DXLT6VRzsbWybSRc+grB3QTnXQhoH8rFJJwOvz Y6hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id; bh=iAIvoZzt9AI/kiAh4rDkvMmjJNAOiGLUJVsOkGr3PZU=; fh=zzgUep6/mr1szrCKHgbVJtG5Ibpdbsnuy3ZGUxvXkMw=; b=nBkDuhBGmQG69q4bmzjM20ucgz8mVIerY5zGdkVayRYbrdqNuH9SPaFScJ4tYijeCN CN3vz4fdNzZnY5bRjaCtQKF3p6lAvNqEawmYPi32SrPHosEtgDggsOQsy7SOcAUgkLxj o0l22mWqNt5qkrgnEvyhL95Hkojr2QZNJJToz8ZEIL7FDDoypJ0gNDqf/m8Donj6yAP5 y2jjuQqvqfVnyvSlT2SxAY4UoDOtzBIMEpXXYAHz3tUsPv11/ELp9VEXchkbi9ypnjCE IBotEFMtdulhVKv7g2bsCN6XYKNEQBBFoB3L602ml/y+obT6i93Mq9+Q8KSPMttbQn88 1lxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-24982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24982-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t10-20020a0cb70a000000b0067f398fe69asi3343118qvd.525.2024.01.12.10.49.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 10:49:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-24982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24982-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 06D321C21DE5 for ; Fri, 12 Jan 2024 18:49:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F31AF15AC6; Fri, 12 Jan 2024 18:49:11 +0000 (UTC) Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) (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 ECFB113FFE; Fri, 12 Jan 2024 18:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=perches.com Received: from omf18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 779C11201D9; Fri, 12 Jan 2024 18:49:02 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf18.hostedemail.com (Postfix) with ESMTPA id 012A630; Fri, 12 Jan 2024 18:48:59 +0000 (UTC) Message-ID: <3513adb04d17156242c92121a7aec4515c39bcf5.camel@perches.com> Subject: Re: [PATCH v1] checkpatch: allow build files to reference other build files From: Joe Perches To: Will McVicker , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn Cc: linux-kbuild@vger.kernel.org, kernel-team@android.com, linux-kernel@vger.kernel.org Date: Fri, 12 Jan 2024 10:48:59 -0800 In-Reply-To: <20240112183420.1777576-1-willmcvicker@google.com> References: <20240112183420.1777576-1-willmcvicker@google.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 012A630 X-Stat-Signature: 17cpn1z9nsynxtahe8bd53hk5acu46fw X-Rspamd-Server: rspamout04 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1/NhfRSfoGQcPU3J0GljDoIYBRUUI5+348= X-HE-Tag: 1705085339-497474 X-HE-Meta: U2FsdGVkX187bPcpwcUAJDeBsRl4Gr9KR7DMcuAG7TCxkJkddpIC8jQCo/n8mRlVqwdYZHETAka/N05R8RU0OrpaqPp41vobTAtkHyDqCZISuhCONLoDSElhB3DRQQRURBemPl48DqdVsdFc6b0FHtFlFha0CllYY3DhZun3txgmWq6H4mvlzX2ZPvUFS4GzOwmwiJtTqYEx5XDbwyzQ4i3EnAAMZYc/TiLuDIn0mTao6rsBIrSCa3+aeBX74H9kEsPdPJ/JONHPMdIqohUyDo5TD41VI1PRn5YtsuABJvEymmzFGXAAKtGWcSymlyFe On Fri, 2024-01-12 at 10:34 -0800, Will McVicker wrote: > Add an exception to the EMBEDDED_FILENAME warning for build files. This > fixes the below warnings where the Kconfig and Makefile files reference > other similarly named build files. >=20 > WARNING:EMBEDDED_FILENAME: It's generally not useful to have the > filename in the file > #24: FILE: Kconfig:34: > +source "drivers/willmcvicker/Kconfig" >=20 > WARNING:EMBEDDED_FILENAME: It's generally not useful to have the > filename in the file > #36: FILE: Makefile:667: > + } > Makefile No need to wrap here I think. > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -3785,7 +3785,9 @@ sub process { > } > =20 > # check for embedded filenames > - if ($rawline =3D~ /^\+.*\b\Q$realfile\E\b/) { > + if ($rawline =3D~ /^\+.*\b\Q$realfile\E\b/ && > + $realfile !~ /Kconfig.*/ && > + $realfile !~ /Makefile.*/) { Align to open parenthesis please. It's not useful to have .* before the / So perhaps better to be if ($rawline =3D~ /^\+.*\b\Q$realfile\E\b/ && $realfile !~ /(?:Kconfig|Makefile)/) { =09 > WARN("EMBEDDED_FILENAME", > "It's generally not useful to have the filename in the file\n" .= $herecurr); > }