Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp355024pxb; Fri, 15 Oct 2021 06:55:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/UuZcNezmS5avUxErNwh3LQ/MNYM9H42pERZL2qHum4Qd8g89YQmzZGai1s1x7RVvYVGe X-Received: by 2002:a62:6411:0:b0:44c:bf9f:f584 with SMTP id y17-20020a626411000000b0044cbf9ff584mr11871547pfb.29.1634306113988; Fri, 15 Oct 2021 06:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634306113; cv=none; d=google.com; s=arc-20160816; b=wz3BXWGrwKwkMFhdiicqIvey2QA5ZXzVbsgLBUgZ4NzC9ryODmy6yarKOvwpKqVVdF s/pGGek6FtPMeOmRgLV3m5Tom10L4LlB6WfH7in2vXiOs2lAKpejs58S/H5IJwGnFW5q CoTWneEIuHZvDrP5IJ8X1Skt7LAGdvOU6oJryo9QB0yZUDCWTqS8zGFWr18vqW8teign 0UGkp3bcpG0ZnA3e3q/PupPc/LdOZqYsVXKLQenjehVcZNB5EKDLAMA0u814vaRkdxOL aZmcJBIGgmJ/zQzaVx9hC7C8hIanEdcZfipym/NWOiC642R9ARiiW7qsSMQnnTbU9hJl 3CTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=sWT0/Cv3T+QtOy+a6rtlNyYAdCNxZjhVCikDmVxi0v8=; b=iEP9MNfgaipB/iIJ7PXttTTyBltLCdYNkRlwyx2QtIvhBqNNWVorD9pW91BW86HdjH DDm0B1xDdmxn+SoNnEHWGS9FnsYwV5nqLISJhkiNOa6uH/kZHDG8nBHyKICwRe9bvP5H /EEPI8g3QXDANc/ZvfOyc5qN2R5+L0+SmpG3V/0vlkVpquXpLnUB1wGO4u/f8xZQiz/x ZgFZo2PFhetE5y9YXeLuVDlOTIlJrVljRM9EfS70UmniJ9BExXftJR9x6tPY3Fgany3/ roq/VhKTfy/kCV18F/9om31VYkGlAUahzizoipNhXwgxWV9QqBMXtRjQy/t7t2LZsR58 eXqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si9520562pgc.199.2021.10.15.06.55.00; Fri, 15 Oct 2021 06:55:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236450AbhJOIBP (ORCPT + 99 others); Fri, 15 Oct 2021 04:01:15 -0400 Received: from mx22.baidu.com ([220.181.50.185]:55822 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234769AbhJOIBO (ORCPT ); Fri, 15 Oct 2021 04:01:14 -0400 Received: from BJHW-Mail-Ex10.internal.baidu.com (unknown [10.127.64.33]) by Forcepoint Email with ESMTPS id 4CBF44C1AD06C1EAF44C; Fri, 15 Oct 2021 15:59:02 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex10.internal.baidu.com (10.127.64.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Fri, 15 Oct 2021 15:59:02 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Fri, 15 Oct 2021 15:59:01 +0800 From: Cai Huoqing To: CC: Dwaipayan Ray , Lukas Bulwahn , Joe Perches , Jonathan Corbet , Andy Whitcroft , , Subject: [PATCH 1/2] checkpatch: Add check item for RFC tags is outside the subject prefix Date: Fri, 15 Oct 2021 15:58:51 +0800 Message-ID: <20211015075853.4038-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex31.internal.baidu.com (172.31.51.25) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) X-Baidu-BdMsfe-DateCheck: 1_BJHW-Mail-Ex10_2021-10-15 15:59:02:286 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some patches have been sent, the RFC tag of which is outside the subject prefix is incorrect. like this: "Subject: [PATCH v2] RFC:" Perfer "Subject: [RFC PATCH v2]" to "Subject: [PATCH v2] RFC:", so add check item for it. Signed-off-by: Cai Huoqing --- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c27d2312cfc3..802f78904247 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3121,6 +3121,12 @@ sub process { "A patch subject line should describe the change not the tool that found it\n" . $herecurr); } +# Check if RFC tags is outside the subject prefix + if ($in_header_lines && $line =~ /^Subject:.*patch\s*.*]\s*rfc:/i) { + WARN("RFC_TAG_PREFIX", + "RFC tag is outside subject prefix, try \"git format-patch --rfc\"\n" . $herecurr); + } + # Check for Gerrit Change-Ids not in any patch context if ($realfile eq '' && !$has_patch_separator && $line =~ /^\s*change-id:/i) { if (ERROR("GERRIT_CHANGE_ID", -- 2.25.1