Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp2951795img; Mon, 25 Mar 2019 00:09:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyK8mP62F06XUCn8H1fRu5JdDykelZEgRJZ1xFSfV1P3KbETZaGXA+gGYc8UaKqAEy4popN X-Received: by 2002:a63:5318:: with SMTP id h24mr22019534pgb.76.1553497782959; Mon, 25 Mar 2019 00:09:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553497782; cv=none; d=google.com; s=arc-20160816; b=TdKU77jbIvnWJ6veFhP+ZXx6lCTCsMkiBxa2g8Y8wqR4CGdznh7BD7R74ZZRbCM9/7 gKz8grazvinisDB7otIW98yiyQq7h/I7QEcD5RFwjt2dD6iPJE7/AYEzGLA5e5WA5G/4 IWqjnZOs1czN3NkJS+wc/iTv9EgkEPtWpkyJYFSgbLU4xdSkF9G9nxeWb+GelVodoWdc ckOtEwMsYu9jUwYTIFTAwh4crnYV9wd/Xvb4/PgfFV491P0P12armQgRlalzVz7I3aGT iZ6NBtgviYYEbbPxYDt6Iopnp5fFt+3nBXKp3aMb72rgCgdQaoiFmdbJ7ehtMZd3g84k rHQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:references:to:from:subject; bh=xRf9tQ1BHDGP3QHguXZTwnU0cjyE4sIniiCh5nyfITs=; b=MSzupxjtlJBuE+eLQKTVoqklEEe0lmc5uJlKk7L0nfx6qgcouXuhId90P8bwRemPE8 qsR9qxpvXmdJbYfYgviOWmNMiLp4ZceXU42TRVxa0Ks4vgNj6zQ3Tb+hfn5g8Ouk0j16 g46m3CWtPeCx6xEwfi0dt/O9Ory037SyDtGU8pznGVuBDpJyWslx0dcEap5Zn2atSqfx ruRGic/k8P/g06skflKO34rkQxBlJo95b6YJvBiGBbWS4aH7TExScg4wHyjquqgY5zB7 v1nUElCMgtnjL33N2FEeoUR/ixrn9jTgkamHqnJ1x5tVZOMMIrFVjNrEAzX3bw16R5J/ CFqQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si13175402plx.64.2019.03.25.00.09.27; Mon, 25 Mar 2019 00:09:42 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729813AbfCYHIO (ORCPT + 99 others); Mon, 25 Mar 2019 03:08:14 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:46995 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729230AbfCYHIN (ORCPT ); Mon, 25 Mar 2019 03:08:13 -0400 X-Originating-IP: 79.86.19.127 Received: from [192.168.0.11] (127.19.86.79.rev.sfr.net [79.86.19.127]) (Authenticated sender: alex@ghiti.fr) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 95C9E1C0005; Mon, 25 Mar 2019 07:08:11 +0000 (UTC) Subject: Re: [PATCH] scripts: checkpatch: Check block comments start with /* empty line outside net From: Alex Ghiti To: Joe Perches , Andy Whitcroft , linux-kernel@vger.kernel.org References: <20190305180238.32630-1-alex@ghiti.fr> <4b86da69fc4460a9992a5d90fe2a1673c2fa4f37.camel@perches.com> <9d200724-6ca0-6412-7862-5166241bafa7@ghiti.fr> Message-ID: <930a98dc-7b1b-7221-ac55-6fcbcdf2f783@ghiti.fr> Date: Mon, 25 Mar 2019 03:08:11 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: sv-FI Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/17/19 11:48 AM, Alex Ghiti wrote: > On 3/6/19 7:12 AM, Alexandre Ghiti wrote: >> Le 3/6/19 à 12:08 AM, Joe Perches a écrit : >>> On Tue, 2019-03-05 at 13:02 -0500, Alexandre Ghiti wrote: >>>> This patch ensures that apart from net code, block comments start >>>> with an >>>> empty /* line. >>> I'm not sure it's useful to try to eliminate these types >>> of lines as there are ~20K of them in the kernel >>> >>> $ git grep -P "^\/\*\s*\S" | \ >>>    grep -v "\*/\s*$" | \ >>>    grep -vP "^(drivers/net|net/)" | \ >>>    grep -vP "\/\*\**$" | \ >>>    wc -l >>> 19437 >> >> >> This is part of the coding style, some people rely on checkpatch for >> this matter, >> so I think we should at least warn user, that would avoid patch >> bouncing. >> >> >>> >>> Also, perhaps the code would be simpler using something like: >>> --- >>>   scripts/checkpatch.pl | 11 +++++++++++ >>>   1 file changed, 11 insertions(+) >>> >>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl >>> index d0001fd1112d..c62dbd440c50 100755 >>> --- a/scripts/checkpatch.pl >>> +++ b/scripts/checkpatch.pl >>> @@ -3262,6 +3262,17 @@ sub process { >>>                    "networking block comments don't use an empty /* >>> line, use /* Comment...\n" . $hereprev); >>>           } >>>   +# Block comments use an initial blank /* unless self contained >>> single line >>> +# or a continuous header line like /********************** >>> +# This also allows for introductory kernel-doc /** lines >>> +        if ($realfile !~ m@(?:drivers/net|net/)@ && >>> +            $rawline =~ m@^\+\s*/\*(?:\s*\*++)?\s*\S@ && >>> +            $rawline !~ m@\*/\s*$@ && >>> +            $realline > 2) { >>> +            WARN("BLOCK_COMMENT_STYLE", >>> +                 "Block comments start with only /* on an otherwise >>> blank line\n" . $herecurr); >>> +        } >>> + >>>   # Block comments use * on subsequent lines >>>           if ($prevline =~ /$;[ \t]*$/ && #ends in comment >>>               $prevrawline =~ /^\+.*?\/\*/ && #starting /* >>> >>> >> Your version handles more cases, but why is it simpler ? Anyway, >> that's ok for me >> if you prefer your version. >> >> Thanks for your comments, >> >> Alex >> >> > > Hi Joe, > > Can I do something more regarding this patch ? > > Thanks, > > Alex > Hi, Sorry for insisting, but do you consider this patch for inclusion ? Thanks, Alex