From patchwork Fri Oct 16 02:49:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 11840769 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CA30015E6 for ; Fri, 16 Oct 2020 02:49:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7D57820E65 for ; Fri, 16 Oct 2020 02:49:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="v33v2Wef" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D57820E65 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 77BDE94006A; Thu, 15 Oct 2020 22:49:22 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 70424940034; Thu, 15 Oct 2020 22:49:22 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A79894006A; Thu, 15 Oct 2020 22:49:22 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0133.hostedemail.com [216.40.44.133]) by kanga.kvack.org (Postfix) with ESMTP id 2A871940034 for ; Thu, 15 Oct 2020 22:49:22 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id BC6C98249980 for ; Fri, 16 Oct 2020 02:49:21 +0000 (UTC) X-FDA: 77376257322.28.gold54_0212ea727219 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 9DC436C05 for ; Fri, 16 Oct 2020 02:49:21 +0000 (UTC) X-Spam-Summary: 1,0,0,f2395e3c35f01798,d41d8cd98f00b204,akpm@linux-foundation.org,,RULES_HIT:41:152:355:379:800:960:967:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1381:1431:1437:1513:1515:1516:1518:1521:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2525:2538:2559:2563:2682:2685:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3865:3866:3867:3870:3871:3872:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4321:4605:5007:6261:6653:6690:7576:7903:8784:9025:9121:9545:10004:10400:11026:11233:11473:11658:11914:12043:12048:12297:12438:12517:12519:12555:12679:12986:13069:13141:13146:13230:13311:13357:13846:14181:14721:21080:21451:21627:21740:21939:30054:30067:30070,0,RBL:198.145.29.99:@linux-foundation.org:.lbl8.mailshell.net-62.2.0.100 64.100.201.201;04y8aiqqjmm1maaq5a7hqu6xfw3duocitrpu3znsnjed9kytmboao8o9pdyojhk.y659jrmp97fddg5whe6swjurg6d4crqdsj17toscpyqfaoh3adddi6ih5mrubpy.4-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayes ian:0.5, X-HE-Tag: gold54_0212ea727219 X-Filterd-Recvd-Size: 3298 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Fri, 16 Oct 2020 02:49:21 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DCB48208C7; Fri, 16 Oct 2020 02:49:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602816560; bh=pMsQ5TWVu8f3N0dTVqVu0NXUQPYASWgT4Q+oTMgr+yQ=; h=Date:From:To:Subject:In-Reply-To:From; b=v33v2WefVLp+YWrRyiXx3E+eGNpFm43J8zTaejQ4Wq/d0RqFA24hbi+P9WcZEQ7YX +b9/t1NhXxglcoxBAT1dfzmBHY2JJRzHuJ2YxI3AfctBlKmHJ9ycugRlqLZC20C9mV PADHfQzQFp3SS3cjVeff5cOi5svo6SccuoPEtsx8= Date: Thu, 15 Oct 2020 19:49:19 -0700 From: Andrew Morton To: akpm@linux-foundation.org, b.zolnierkie@samsung.co, joe@perches.com, l.stelmach@samsung.com, linux-mm@kvack.org, m.szyprowski@samsung.com, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 132/156] checkpatch: fix false positive on empty block comment lines Message-ID: <20201016024919.EyIEDSv-j%akpm@linux-foundation.org> In-Reply-To: <20201015192732.f448da14e9854c7cb7299956@linux-foundation.org> User-Agent: s-nail v14.8.16 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Łukasz Stelmach Subject: checkpatch: fix false positive on empty block comment lines To avoid false positives in presence of SPDX-License-Identifier in networking files it is required to increase the leeway for empty block comment lines by one line. For example, checking drivers/net/loopback.c which starts with // SPDX-License-Identifier: GPL-2.0-or-later /* * INET An implementation of the TCP/IP protocol suite for the LINUX rsults in an unnecessary warning WARNING: networking block comments don't use an empty /* line, use /* Comment... +/* + * INET An implementation of the TCP/IP protocol suite for the LINUX Link: https://lkml.kernel.org/r/20201006083509.19934-1-l.stelmach@samsung.com Signed-off-by: Łukasz Stelmach Acked-by: Joe Perches Cc: Bartłomiej Żolnierkiewicz Cc: Marek Szyprowski Signed-off-by: Andrew Morton --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/scripts/checkpatch.pl~checkpatch-fix-false-positive-on-empty-block-comment-lines +++ a/scripts/checkpatch.pl @@ -3464,7 +3464,7 @@ sub process { if ($realfile =~ m@^(drivers/net/|net/)@ && $prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ && $rawline =~ /^\+[ \t]*\*/ && - $realline > 2) { + $realline > 3) { # Do not warn about the initial copyright comment block after SPDX-License-Identifier WARN("NETWORKING_BLOCK_COMMENT_STYLE", "networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev); }