Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1105600pxb; Thu, 28 Jan 2021 08:08:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJyTyLcW0kLJK5hxnNWoEsI5EP2a7TzgYOwWsuGrYX6/tcVMybiOy6Ygemf4/WzzFe9wPlqj X-Received: by 2002:a17:906:c295:: with SMTP id r21mr54195ejz.235.1611850094204; Thu, 28 Jan 2021 08:08:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611850094; cv=none; d=google.com; s=arc-20160816; b=nelCzdlmj6p3jbo5cJLV/UiAuNjz16vqv6VvyjUV+vtBQurJ6sjnh6Qxx9y0Y7+T6J kitYR3ooAUYusI8wsQes9tHkafUkSndFzGYb1HXRVyD2rU8UHEFZS3jWAS+GKNY3pdTR flugg0LcR7BFCKA6mn9R/AOpfU2FAX7I+qKAwMbSzLSHlWYJCluzyX7DPYK8kHgv1YG0 MHFH+kYqAhLYT12z/tUwvp5Wa6iaDnBEmv+RXSwIR4upCM8r+aynlNicv0qBVlkDELCu JY9UTI5B5aXjs3vGw+pqfHtcYf6gxqA1v79Tqy6nS3ItuME23nD9Bjd5PhGbQ+v9irqG Wmxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:message-id:date:subject:cc :to:from:dkim-signature:dkim-filter; bh=FsjU8c1bivXOBROmwAViTma35lYMYvaKeTl7tbxOmKQ=; b=H4qtwR/dxFshix8FLNlUfhcUaLN4gt5orV7iIhVLhhPhN7KTB9vem+5sLwukbf0wQL wtXZZXwyyTs1fPDKwOiiXq8v9JTJC+DplyUYQPNgcPQ8RkHCocXLSxcG4unzsUI37Oz1 NhHBgtgDT2LaGFUIOAO2li3DDMXKJBEa4iZumKTtha9hZRd95WxMbQXZX+ikxm/DDWZR c9+dnjFn5MXcbb2oVhtkmPW9XT86FvIeM5U/6/LjsNNBRZ8ISoQNfogUSyd6Z4EhVbln 6eobezwk9a0LnzCB3+iYl2g/DR979vFNTxWTyWRwtGPJ7nyXFhQg7KzbGHrtRdocwa/H lPjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=miTP+Vfg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l17si2939163ejf.260.2021.01.28.08.07.49; Thu, 28 Jan 2021 08:08:14 -0800 (PST) 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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=miTP+Vfg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231858AbhA1QEt (ORCPT + 99 others); Thu, 28 Jan 2021 11:04:49 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:50042 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232178AbhA1QEm (ORCPT ); Thu, 28 Jan 2021 11:04:42 -0500 Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210128160359epoutp02bf941fd884d22d7278b76f4ae47e8372~ecOOsGW891592515925epoutp022 for ; Thu, 28 Jan 2021 16:03:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210128160359epoutp02bf941fd884d22d7278b76f4ae47e8372~ecOOsGW891592515925epoutp022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1611849839; bh=FsjU8c1bivXOBROmwAViTma35lYMYvaKeTl7tbxOmKQ=; h=From:To:Cc:Subject:Date:References:From; b=miTP+Vfga3ixT/BKI1tTD6XcMh2ObBDz+BVqTEBvHxEkFLsVc50UW8MEMqaWYWVcy J9regO0HAvmpQugz5g0WQH/rZiKsVsSgoG5hQA7LmP8xXurR513a6qZkWv4uRbhhNc 5jUZbkLwaQjcKIvojkc5l9bjDYj0LSQH63Pn5lPw= Received: from epsmges5p2new.samsung.com (unknown [182.195.42.74]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20210128160358epcas5p1b91936fd49694b195801f36fe4f38f94~ecONlzNSc0337303373epcas5p12; Thu, 28 Jan 2021 16:03:58 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 11.14.50652.E60E2106; Fri, 29 Jan 2021 01:03:58 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20210128152646epcas5p3e0ceb57e0a2e668b4281b5733dd117d4~ebtvMVtJH1394113941epcas5p3P; Thu, 28 Jan 2021 15:26:46 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210128152646epsmtrp2b408b1a93969ba27035b8350dc2bd57f~ebtvLq9S41128611286epsmtrp2q; Thu, 28 Jan 2021 15:26:46 +0000 (GMT) X-AuditID: b6c32a4a-6b3ff7000000c5dc-8e-6012e06e05f5 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 51.F5.08745.6B7D2106; Fri, 29 Jan 2021 00:26:46 +0900 (KST) Received: from ubuntu.sa.corp.samsungelectronics.net (unknown [107.108.83.125]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210128152645epsmtip177db73be12043a92395a268a4eb6dd1a~ebtuKkaNN0232802328epsmtip1B; Thu, 28 Jan 2021 15:26:45 +0000 (GMT) From: Shradha Todi To: linux-kernel@vger.kernel.org Cc: apw@canonical.com, joe@perches.com, pankaj.dubey@samsung.com, Shradha Todi , Lakshay Mehra Subject: [PATCH] checkpatch: add warning for line space after "Fixes:" tag Date: Thu, 28 Jan 2021 20:56:43 +0530 Message-Id: <1611847603-15736-1-git-send-email-shradha.t@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDIsWRmVeSWpSXmKPExsWy7bCmhm7eA6EEg+fP5S0+rNWwmH3/MYvF nec3GC0u75rDZrFo6xd2i97DtQ5sHrMaetk8vqy6xuzRt2UVo8fnTXIBLFFcNimpOZllqUX6 dglcGZP77rAXzOao2LNsAnsD40G2LkZODgkBE4nm3w9Zuhi5OIQEdjNK7N64kgnC+cQosf3M AkYI5zOjxNPjTUwwLZ/f7YJq2cUosX76FyinhUli2b1/jCBVbAJaEo1fu5hBbBEBBYnNvc9Y QYqYBXoZJbqed4JtFxbwkrjx4S9YA4uAqsSu+w3sIDavgKvE4+Z+qHVyEjfPdTKDNEsIzGOX WP19KitEwkXizZSTLBC2sMSr41vYIWwpoPv2Qr2XLzH1wlOgGg4gu0JieU8dRNhe4sCVOWBh ZgFNifW79CHCshJTT60DW8sswCfR+/sJ1Am8EjvmwdjKEl/+7oHaKikx79hlqGs8JJpXTGIE GSkkECuxYi3rBEbZWQgLFjAyrmKUTC0ozk1PLTYtMMpLLdcrTswtLs1L10vOz93ECI5wLa8d jA8ffNA7xMjEwXiIUYKDWUmE9+0coQQh3pTEyqrUovz4otKc1OJDjNIcLErivDsMHsQLCaQn lqRmp6YWpBbBZJk4OKUamKwt3mlH1tzIqrG8KrmgZ47NjPSiTwaJlgt2z+lde/z9xpBrR2+t v1mkK28cLtNcbM92JWi9mqfFDxF3U4m1r5tWvlQJvX7/pheXm4Oa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kjnq7E8er5hnBkzzmafnvB13p3agn0PZildvdExp3C1Tt87JZbijERDLeai4kQAOmDBcIYC AAA= X-CMS-MailID: 20210128152646epcas5p3e0ceb57e0a2e668b4281b5733dd117d4 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P X-CMS-RootMailID: 20210128152646epcas5p3e0ceb57e0a2e668b4281b5733dd117d4 References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a check to give warning for line break between Fixes tag and signature tags as that is the commonly followed style. Also add a --fix option to delete space lines after "Fixes:" tag. Signed-off-by: Lakshay Mehra Signed-off-by: Shradha Todi --- scripts/checkpatch.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 92e888e..6c144c5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3027,6 +3027,15 @@ sub process { $commit_log_long_line = 1; } +# Check for no line break after Fixes + if ($line =~ /^\s*Fixes:/i && $rawlines[$linenr] =~ /^\s*$/) { + if (WARN("UNNECESSARY_NEWLINE", + "Newline is not required after Fixes:\n" . $herecurr) && + $fix) { + fix_delete_line($fixlinenr+1, $rawline); + } + } + # Reset possible stack dump if a blank line is found if ($in_commit_log && $commit_log_possible_stack_dump && $line =~ /^\s*$/) { -- 2.7.4