Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2479252rdd; Fri, 12 Jan 2024 10:34:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxZmbHBFFVN33/WYRztt+6AkNs6TTewoC1/Xtz2edlLD75uMyLY/6RvvQhoZCu/ltQF9+O X-Received: by 2002:a17:902:dacc:b0:1d4:638f:3ffb with SMTP id q12-20020a170902dacc00b001d4638f3ffbmr1454514plx.39.1705084487469; Fri, 12 Jan 2024 10:34:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705084487; cv=none; d=google.com; s=arc-20160816; b=C8Zs9nn8AZ2I4/9nVtABRg5wbMeKbTMR5plHbV2RtxBWnlgphOOxjjNPailGiqdP0j H94SMHRkiJ6xNoyVTLZmvR32HxHGgSx+b1Y+FgIsUX/RdqQyY5ezN+WxajVzsDoQwsfr px05tUa5VCF1FaUwg7QAQd7l9pKiVw2mFpxkWlWNtkipoPD6D2tJzshJ7vDBtcz6A+XL YH9QPtqCi8T4TDkAqZuszLcbgEeNnRP/PMkxPf9ao+0RuCyxPvrUEdP4Ag1FQWr5nLLp SA9dfr6ejLJ4k2csCKUF0RRe+KpuKUS8jQVsKw6l3l3uS7dXr8Bk4N4HnhJVGudfWw4R OqWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=GlGgb0cBHVu1ifFKwOv+GQYvTTYJliQt0u5z/Pbkfrw=; fh=z7plL6oWUXfe6Wvrnbu664miisqCGoaaB+enY5ehlI4=; b=tDDwWCP4clGOIsFAAOUFM4VE98ZUH6KS1MoVQWkd8HDUSlkV1yac8G5DAtbBYCqyio gh6rN6Skbbdb87OOV58FUiRvWis1Kuf9F/+FLMqhpFijq+EwOpeN/Jtgp+0Ce20jA8HD eyC8gxP3txbl3CT2BQeb6aEH1lvvNbKSsQBKGZtUJJXLmaKhwIo3w6k/NhXTzFsTY0d7 HmFnvTlqlLAsuy1UsNW3Y4iG4hObP83KYlY6URVaOuG3mvg53DAoHfFuHQWOuA4tLBxo LesmPXJCxrin09fOtoHwDC4RiN0g9uRmVw0hYcvSNuTV8vX3RgflBq03hcaJdzek7jIN 96iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=pYJ1hGLn; spf=pass (google.com: domain of linux-kernel+bounces-24975-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24975-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id kf7-20020a17090305c700b001d47fc3767bsi3734986plb.119.2024.01.12.10.34.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 10:34:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24975-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=pYJ1hGLn; spf=pass (google.com: domain of linux-kernel+bounces-24975-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24975-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1F09D2820E3 for ; Fri, 12 Jan 2024 18:34:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0198014F87; Fri, 12 Jan 2024 18:34:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="pYJ1hGLn" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (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 6C81914F63 for ; Fri, 12 Jan 2024 18:34:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--willmcvicker.bounces.google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dbeaf21e069so9020341276.1 for ; Fri, 12 Jan 2024 10:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705084478; x=1705689278; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=GlGgb0cBHVu1ifFKwOv+GQYvTTYJliQt0u5z/Pbkfrw=; b=pYJ1hGLn5bfg/LNhpyeIaQ4Qbi65jyrpZtPy5GeXMKDfoHAMAPxtWRXZ+0X8iQNPzO jCeGdWYzxbBe47LN5fLfRYcG5cgSktWrGkeNJZOdHmAKoKERyYWhcUDRAvwLoeJyKKXb 3ipn+zNB/MzJu/8TTWrhC73OIW5FE4SfFCf5MorTXZ4rvaVovNSp/NlNuDBNxIOzl7Xc ihBO1lZFlgFjGw832rBuf0Rtox+Z3c3Q7Y/F1YrWRoVEYufycbZT+0t7/xbv+yEbVGlX XlIpPntZMb9kANTqU0wfAbxeCa6iRfDfBhhCk73mxFyYN7IqEFaaNu2BdAo9zXo583Bn JPzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705084478; x=1705689278; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GlGgb0cBHVu1ifFKwOv+GQYvTTYJliQt0u5z/Pbkfrw=; b=Z1zUIB1zC0D9TMgMDQ79wAdpxjUSZDYdAi6aAHJcy0tnv1w86K8jTO0xMFstlrPQwa CXnDbg8jl3imIdUxeZ8WaLsKxgO14ul+K7JwkcvFr6wd9O7aP4VAXdChE7cRoHn5uadR 2SAi8jirb2HM28eAHxQYolCG/JNoFzBNogPzgIntdiT7KkhYEwydC80d9PvbmJepMY1y /qAKpkNvK6w0g7VTLwEmh64ovSq8zDctIcEexix+Jxh4x+S6IoE1PWsLX02tP9gqrYml 5LJEYoMcmV+QuCFWdQr9JAHAAAILnDt/q1dG3AZohbbubLVqW92zydXr3UVCrNgPXIYn ituw== X-Gm-Message-State: AOJu0YwacPGSolxwnXbwy3WlFOXaZZQZISAip2w6SQQmCXOh/GuMSSCw FKxpKYa9r7iZZoBZG/eqalCP5VfXUZ14aT2o+U3Gr6N+KA== X-Received: from wmcvicker.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5ebe]) (user=willmcvicker job=sendgmr) by 2002:a05:6902:102c:b0:d9a:efcc:42af with SMTP id x12-20020a056902102c00b00d9aefcc42afmr64403ybt.2.1705084478457; Fri, 12 Jan 2024 10:34:38 -0800 (PST) Date: Fri, 12 Jan 2024 10:34:19 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.275.g3460e3d667-goog Message-ID: <20240112183420.1777576-1-willmcvicker@google.com> Subject: [PATCH v1] checkpatch: allow build files to reference other build files From: Will McVicker To: Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn Cc: linux-kbuild@vger.kernel.org, Will McVicker , kernel-team@android.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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. WARNING:EMBEDDED_FILENAME: It's generally not useful to have the filename in the file #24: FILE: Kconfig:34: +source "drivers/willmcvicker/Kconfig" WARNING:EMBEDDED_FILENAME: It's generally not useful to have the filename in the file #36: FILE: Makefile:667: + } > Makefile Signed-off-by: Will McVicker --- scripts/checkpatch.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f8343b34a28b..62939f5800cf 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3785,7 +3785,9 @@ sub process { } # check for embedded filenames - if ($rawline =~ /^\+.*\b\Q$realfile\E\b/) { + if ($rawline =~ /^\+.*\b\Q$realfile\E\b/ && + $realfile !~ /Kconfig.*/ && + $realfile !~ /Makefile.*/) { WARN("EMBEDDED_FILENAME", "It's generally not useful to have the filename in the file\n" . $herecurr); } base-commit: 70d201a40823acba23899342d62bc2644051ad2e -- 2.43.0.275.g3460e3d667-goog