Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp105397yba; Mon, 20 May 2019 05:48:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIgEj/Q8bGVFm+I1YepMA8mTZHtnBIOFhmoPO6OPnKoOkVpini6vTzuM9gDnxKQ9yokO/4 X-Received: by 2002:a17:902:a605:: with SMTP id u5mr26617059plq.43.1558356512803; Mon, 20 May 2019 05:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558356512; cv=none; d=google.com; s=arc-20160816; b=A5NHunYc8ETHrLF82NRShevuvwleG/q7Y51z3pak5zvOUF3/ZY6Mkjim2Fua+j1XF5 ZQTCfoZy0tDjJAzyE0hYMul4dpKNFUuVjLVwdbw4i86hUBxUoT1RGOyRX+TOSWu+BhQm RFuuPycQeVBaz8pOf3zacIegdtIN+jkDqsW5XzJnJ1c4mkbX59+6V4MhaeMLKK47Mv47 sBgeVHBYm7YXxmQdHXrGyIQ16lU0W9AxqlKAvi8ovMeBVLjjqezdsW0kiagHqOe1rrif I8Ar+LHh+v54kHM1V7oYytnDQWFL1+k6LGtIcE07KjRUXou37NvLDBeBzyq9MfHwdmE9 JBUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=DnYcpObWTuNxMqWTKSiW08f0YpZsIp8D6UxdO7lCUao=; b=ViIJFgb2fQdqYbEmtO7bfOFt3Quon0p87WHcu+OBZNJG3dQ9Fy7mEJDS4fpg5ao8H4 3wVb0bup3AUB//EIxlvvZa10/8zNvBl6Qc6Xiz3fnmxQXsK0xRHTN4qYzG5kyaChbo64 Nxjqe/mayUJEX75crffi1etxO74AoNZp0TWg2SKwIPQOKTpOYTIY460541U5gitZRTDD qtdgJqfB25SEvYgrU7RYj9CTMVQEFmIGvX6l3DuwPRsHeliYFrEc3gjne/sYIqfRYWXb 7y105YG+kDgj3fyAWwiBklTzoefpbvIw4W6H08ZhS+oIWZXl5s3fjjY7YgXi3t+K8BZh AmSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0818 header.b="YJ92PSD/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=marvell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si19622220pfg.152.2019.05.20.05.48.17; Mon, 20 May 2019 05:48:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0818 header.b="YJ92PSD/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391472AbfETMp3 (ORCPT + 99 others); Mon, 20 May 2019 08:45:29 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:37758 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389437AbfETMp1 (ORCPT ); Mon, 20 May 2019 08:45:27 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4KCefq1019411; Mon, 20 May 2019 05:45:21 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=DnYcpObWTuNxMqWTKSiW08f0YpZsIp8D6UxdO7lCUao=; b=YJ92PSD/5kpBHZWp3ghsL3eNwSn1tYN73MnEeOqDz20ELgdI/ZxtL2DMpyRCHzHlfaJy zniTefqahjbilBInh3HIx7hcTn9bkw7OZ5yWJfERIiMhMdE266YiU1YTFDp6UHASgmVr VDZ7vfwSrM3nEFaxbw38KU5aIqMgSBFQ7EfexiRq/nHY05KFcaMVe0pJyEdil2YRN0AS Idf+EcciOJs4GLoXOhIAJfbQMug84ejnulE5Eht67dbAT3QeA34ejsK3HwTn+DhK2gF6 FJ8e/VthJx3TPoH8WmD8o4UyDJI0Moo1L3N7wYjihKH98LE1OkPusOAMnmVUy+yAjlWC Bg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2sjhjjr4bj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 20 May 2019 05:45:20 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 20 May 2019 05:45:19 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 20 May 2019 05:45:19 -0700 Received: from lb-tlvb-michal.il.qlogic.org (unknown [10.5.220.215]) by maili.marvell.com (Postfix) with ESMTP id EBB613F703F; Mon, 20 May 2019 05:45:17 -0700 (PDT) From: Michal Kalderon To: , , , CC: Subject: [PATCH] checkpatch: add test for empty line after Fixes statement Date: Mon, 20 May 2019 15:42:38 +0300 Message-ID: <20190520124238.10298-1-michal.kalderon@marvell.com> X-Mailer: git-send-email 2.14.5 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-20_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Check that there is no empty line after a fixes statement Reviewed-by: Leon Romanovsky Signed-off-by: Michal Kalderon --- scripts/checkpatch.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a09333fd7cef..6cbc07364d4f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -62,6 +62,7 @@ my $conststructsfile = "$D/const_structs.checkpatch"; my $typedefsfile = ""; my $color = "auto"; my $allow_c99_comments = 1; # Can be overridden by --ignore C99_COMMENT_TOLERANCE +my $fixes = 0; sub help { my ($exitcode) = @_; @@ -2792,6 +2793,18 @@ sub process { } } +# Check if Fixes statement to make sure next line is not blank + if ($fixes) { + if ($line =~ /^\s*$/) { + WARN("EMPTY_LINE_AFTER_FIXES", "No Empty line after Fixes statement\n" . $here); + } + $fixes = 0; + } + + if ($in_commit_log && $line =~ /Fixes/) { + $fixes = 1; + } + # Check for added, moved or deleted files if (!$reported_maintainer_file && !$in_commit_log && ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ || -- 2.14.5