Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2122525rdh; Tue, 26 Sep 2023 13:10:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEvoAMIbeoQglzYtnfW0PhJZ9qY//ERXK3McLjYC/URz0TtSiqJnBbMJlQqaQdyVBgPlkiz X-Received: by 2002:a05:6808:347:b0:3ad:f6a5:431f with SMTP id j7-20020a056808034700b003adf6a5431fmr83932oie.0.1695759047216; Tue, 26 Sep 2023 13:10:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695759047; cv=none; d=google.com; s=arc-20160816; b=RSoaNp8YeUat2XZQFgknW/wRKJbbGN+rYKMq/PsU3zYbjjHY6NXdXad0rUXeSYKB0Y ptquOhzrYtVb9Ctp/+4ma5eg3A2Jn1KgelfPsI5jzjLI367Y205lv5UadTmQ5fNeYiJJ SZKT8CyVHm0QqqUu0iTn3z1zbRUOFfm9jFxeCcDZsVzypXhZvRGrzZygppLLgOruY6K+ RvoksOErWgVvW0nW9lAhQ56a0t7wqeniFbgPYmm3Z19biat2T7SJrRxDE2KE+sOAO/v7 rF4yx0oQ2qOt/ryBBQom6g3atitUNufrMzD7Mx7/LFPrQGHBKyipkYWK2i2kv9JIUgJ6 Tgog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=7oZQY1fuWrwlz9q4CVD7+FEC9CBuUFtlaePewFFjf/k=; fh=fdTmgksfKVaAT2E+icFM0OTkIK51XcyiqwqJ0sMJWN0=; b=OR1NNwSGfV/jruL+pQ7deGMOMAVoM0+3SzDQ+UBubkjp+Nw9rS414cvGISmUhB5riq W0PN3UoR9EuzWROpaZMhTTpfDrgyIxrSuNFOn+4HYdOpe9VPMVzeRRm91GyYg1ikK013 A8/XBAS4w5FhQu+vh2jCfpy2c0P0X/iH6SLSySSMrA5MCp/Np0wfP2E1mcnyFibAr3XN QGM+qOKTjUqb6Sy1zIhaId6a55g7k1H1buGNTLUUdYe9a2YiAsCfLhFdUVhW1iP/fTq0 7mvCpPCW9U88cCyE9pvNbuENM0qQtkGv2Aer/N6ofVg7SH0nv1/CnziR/pUJIF8aisgX UYWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id m9-20020a654389000000b00565e39e7b80si13209209pgp.678.2023.09.26.13.10.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 13:10:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2C49080268A2; Tue, 26 Sep 2023 12:56:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233435AbjIZT4s convert rfc822-to-8bit (ORCPT + 99 others); Tue, 26 Sep 2023 15:56:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbjIZT4q (ORCPT ); Tue, 26 Sep 2023 15:56:46 -0400 Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40AF8139 for ; Tue, 26 Sep 2023 12:56:39 -0700 (PDT) Received: from omf19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 153B01401C1; Tue, 26 Sep 2023 19:56:38 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf19.hostedemail.com (Postfix) with ESMTPA id D0A6D2002B; Tue, 26 Sep 2023 19:56:34 +0000 (UTC) Message-ID: <1adcfeaa4bd01d59a349daa697cc007e81bc81b1.camel@perches.com> Subject: Re: [PATCH v2] checkpatch: warn about multi-line comments without an empty /* line From: Joe Perches To: Petr Tesarik , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , open list Cc: Catalin Marinas Date: Tue, 26 Sep 2023 12:56:33 -0700 In-Reply-To: <20230926192400.19366-1-petr@tesarici.cz> References: <20230926192400.19366-1-petr@tesarici.cz> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Rspamd-Queue-Id: D0A6D2002B X-Stat-Signature: siki54z4m5k3ukbiesczeso7s1xon815 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Rspamd-Server: rspamout01 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18RwV7z2XZ+CEopVkA3HcOUH900IhNfLeI= X-HE-Tag: 1695758194-275211 X-HE-Meta: U2FsdGVkX19eaIHF7ga9cpIj2HzEocOD1G5G1zoL9dh0T7+33NcAGFYcMNv+7nw6fOEt1cMJw9CiOKTKFYPZnnm+B3B8NEONBJICHFyOunWMm3TDNQO0eGvO4MHtA81SMKE/ILTGnNJeuzjvkMjbLpYur6mNsNhgVY5DyaYGFaDs4vvKjDYBApu2MiygD24dDfOCmGDsBzj0EdZ6ED1o4S+DGKUqUWk4Dyg3UwdOHsSxnp9/Dve8tPKj5HomSh9BE00mb8e5WHqxXePXrXVJfhBNOjYUkQvKK6alfpSgetMr1mLI0rFvAgfMBaIH9z+U X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 26 Sep 2023 12:56:56 -0700 (PDT) On Tue, 2023-09-26 at 21:24 +0200, Petr Tesarik wrote: > According to Documentation/process/coding-style.rst, the preferred style > for multi-line comments outside net/ and drivers/net/ is: > > .. code-block:: c > > /* > * This is the preferred style for multi-line > * comments in the Linux kernel source code. > * Please use it consistently. > * > * Description: A column of asterisks on the left side, > * with beginning and ending almost-blank lines. > */ > > Signed-off-by: Petr Tesarik [] > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -4006,6 +4006,14 @@ sub process { > "networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev); > } > > +# Non-networking without an initial /* > + if ($realfile !~ m@^(drivers/net/|net/)@ && > + $prevrawline =~ /^\+[ \t]*\/\*.*[^ \t]$/ && > + $rawline =~ /^\+[ \t]*\*/) { > + WARN("BLOCK_COMMENT_STYLE", > + "multi-line block comments should start with an empty /* line\n" . $hereprev); > + } > + > # Block comments use * on subsequent lines > if ($prevline =~ /$;[ \t]*$/ && #ends in comment > $prevrawline =~ /^\+.*?\/\*/ && #starting /* Still nack. Too many existing instances. $ git grep '/\*.*' -- '*.[ch]' | \ grep -v '/\*.*\*/' | \ grep -v -P "/\*\s*$" | \ grep -v '/\*\*' | \ grep -v "SPDX-License" | \ grep -v -P '^drivers/net|^net/' | \ wc -l 51834