From patchwork Wed Nov 23 01:12:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Elliott, Robert (Servers)" X-Patchwork-Id: 24647 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2528847wrr; Tue, 22 Nov 2022 17:16:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf6zibG5ehn2ed/6EL40y6JccTv3zS8vw38rcsqtqaE0mBPkRG0b6QERc4yjuszFLqa+w2Bp X-Received: by 2002:aa7:cb8d:0:b0:467:bc1f:ca16 with SMTP id r13-20020aa7cb8d000000b00467bc1fca16mr24000753edt.269.1669166205806; Tue, 22 Nov 2022 17:16:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669166205; cv=none; d=google.com; s=arc-20160816; b=ae2luzpEBdFeeJzDLIlbOrl+OgGWaOMiOmXFsA0jMMwmTutEMbv0dt5YmPur7KmyKD 9WhmDcaaFAJvzzyuhPimKu05LIZ2i2V5x3oaMK+RBfSP2hJmfMPMknwVfQqyG0ynPL+b 94CmO3gTXjUvSNPt69jFfa8+tdjtNsgjDEASj6pyuBe9rwm1EAcTWzYkvv/cEimOf9eY CRlNUMbOh/JQpDL6SLIVPKzap/H63uOBI4wHa4NK5WEJD1udfXNFMqr6VQI6ax2iZWjC 4aDAFizpC0Fv1YVF+GXCJTLKvxFDxiUIuQJMSmWodOihheIUM2rRpj30vp7Zm8VD2KU9 JPeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/RlTiZLWuG8bRJv8ZA7ysw/ihW0wSsUpLCj7eFOnAnA=; b=U+V5t5Hc6w3VVr2C79zXlgSPoV53ukhPUmrxT2gxMXEEXQ7Vga3xJ+nnTaCvuj7Cu8 VUOgfPjmFuNdSVMWupAWfarVvnbsrFyqt7E11nXRSEWUZa49x0Ry+NCry/cVBwLQHBYX ppz/hO6pOqZaou8rPwWeUkJgd9ISy9b/2+kSEiTTd2PL33H0Y+0Qh6xxJxJ8D/UyBwnI sjTL58cu+HFAlUhsoev2mJlqulv8+WUfT9u8KM49KYrVwTiUILXo9qJqKan7TyR3NkWx SqLnaya64FH5TUTu76ugYETfBVwrbooCTYgyy0qUXU1RHh8Qg0vhnup41P/3cVe32bvM yuxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=C5WpVZEs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w22-20020a05640234d600b0045b293121f1si6825557edc.12.2022.11.22.17.16.22; Tue, 22 Nov 2022 17:16:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=C5WpVZEs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235396AbiKWBOI (ORCPT + 99 others); Tue, 22 Nov 2022 20:14:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235535AbiKWBNf (ORCPT ); Tue, 22 Nov 2022 20:13:35 -0500 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE30A2AFB for ; Tue, 22 Nov 2022 17:12:27 -0800 (PST) Received: from pps.filterd (m0150244.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AMNgJd1029821; Wed, 23 Nov 2022 01:12:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pps0720; bh=/RlTiZLWuG8bRJv8ZA7ysw/ihW0wSsUpLCj7eFOnAnA=; b=C5WpVZEs0T+vQS+oNjlXTSRU7BPRD97eT7MhiLpwwx+I1QhpSVqUrek5RHpSn/RNEARt So9QAbD+e1EofHGqn40qyWg376cn8kj81KpA5tQlkWAAWRQhS160Lyqz8egPb9uaShLx WfRZ9UBIJKCH3k0r+m42N6rn4Ac4CZXYGy6nnyzPc2m1mz+ayCrkPJrYAk6OHPm3glja W7VvAUnCNHNOok3uVFy+0ovTHASwM09IQ3vQopec8XK8jwFN+pdq6AXVBhWjAPSo3ZFe 2Xn7JeTJf9KhTtS6NYragGdz4Z3ObSMHByEZzLxb9PAlRNcp0YLyEea+tpKRpN8OpxBO Cw== Received: from p1lg14879.it.hpe.com (p1lg14879.it.hpe.com [16.230.97.200]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3m13u0tehx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Nov 2022 01:12:24 +0000 Received: from p1lg14885.dc01.its.hpecorp.net (unknown [10.119.18.236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by p1lg14879.it.hpe.com (Postfix) with ESMTPS id C02192FCC1; Wed, 23 Nov 2022 01:12:23 +0000 (UTC) Received: from adevxp033-sys.us.rdlabs.hpecorp.net (unknown [16.231.227.36]) by p1lg14885.dc01.its.hpecorp.net (Postfix) with ESMTP id 6E105800369; Wed, 23 Nov 2022 01:12:23 +0000 (UTC) From: Robert Elliott To: apw@canonical.com, joe@perches.com, dwaipayanray1@gmail.com, lukas.bulwahn@gmail.com Cc: linux-kernel@vger.kernel.org, Robert Elliott Subject: [PATCH v2 5/5] checkpatch: ignore a file named b Date: Tue, 22 Nov 2022 19:12:02 -0600 Message-Id: <20221123011202.939319-6-elliott@hpe.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221123011202.939319-1-elliott@hpe.com> References: <20220815041548.43744-1-elliott@hpe.com> <20221123011202.939319-1-elliott@hpe.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 1-ryaoU6EXcneHyP9pUzEm3YoYVfT46s X-Proofpoint-GUID: 1-ryaoU6EXcneHyP9pUzEm3YoYVfT46s X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-22_13,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=630 bulkscore=0 malwarescore=0 spamscore=0 phishscore=0 suspectscore=0 impostorscore=0 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211230007 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750247623397047199?= X-GMAIL-MSGID: =?utf-8?q?1750247623397047199?= If a file named "b" happens to exist, checkpatch complains as it parses the patch lines specifying the filenames. WARNING: patch prefix 'b' exists, appears to be a -p0 patch Squelch that by only complaining if that is a directory, not a regular file, and print the whole path causing concern. WARNING: patch prefix './b' exists, appears to be a -p0 patch Signed-off-by: Robert Elliott --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d11d58e36ee9..5a0252265d3f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2834,9 +2834,9 @@ sub process { $p1_prefix = $1; if (!$file && $tree && $p1_prefix ne '' && - -e "$root/$p1_prefix") { + -d "$root/$p1_prefix") { WARN("PATCH_PREFIX", - "patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n"); + "patch prefix '$root/$p1_prefix' exists, appears to be a -p0 patch\n"); } if ($realfile =~ m@^include/asm/@) {