Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2309900rdh; Tue, 26 Sep 2023 21:08:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFRuX7obBunX32xASN3WofYPfrGrFuUn1+HwpGAhKDEYeWSGkv3gIBe4slWEl4nDRv1gO4K X-Received: by 2002:a17:902:ab07:b0:1c7:22ae:4081 with SMTP id ik7-20020a170902ab0700b001c722ae4081mr574372plb.27.1695787694003; Tue, 26 Sep 2023 21:08:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695787693; cv=none; d=google.com; s=arc-20160816; b=Z3tj6cpMwAr4WkaKWp77aZ5s4B6m+Oqr+ANeLoZWG7frerBmTlFfFa4TiTv2cJUeIv OYUEXQ7pfes2tmLIZudJfKbQRByC6mpKHiOS52Dr4AMMqjOMJZ+/iVf1ZWpWCNkJg8i9 g40nmmGzMDxVW/2fPOX3hjbmZVUclnPG7TSOQ+gsYreuT5OWs0h7VSNABrhVhY/k+bAt 2rHGFo+3hJEIF2VEZiBVz41Sl1TAoaw1uWYPQv7Ca499LD4M7Uy9ofkor0oCU4A7LW0R ZgvvP4gufGJYuaQxG7pPT+Jh4b6s/FdIzdC4qHqXSLxWqLtgKnTn/bmyO5kqjCoA+qnO wtiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Ls0E5r6gXmpipqLs4XmvZbNn/fCtuJhMz5mnG9B6HDM=; fh=t8yb8Zguj0tPR+nS1PkYlzG4Jf8tCv1c/QOyTLi5Zq4=; b=JxIcIaZNgcpFeBz9X+5zljwN+flWqGfT8rBmD5am7laki5/VHk69ACmGJpKxIs2bf1 f9ZSEDO7wsrCvRHkY9SMsezFHhWCc7pm9TRctGn+XnJ0e9E2TXrDqIN3VVatXIJOpGPu 5uScTtGJ5J9k4JZBnVU6jB8iTsaqEP3PU4piatBhAoQIonukCt15k+3tjjIxSn1pJ3p+ GJ5RZ1MW7vi9FE/joVSymZtCtLB4sVV1vWmdCbWxXOFARGo/0a0bkzOHg7F30RDFTofT vMX3m7huK8M7SCZ6pddzZFYjvJoEXbyS+TfnSdiLzynfQwO9hGvxZ60afDam5CPIKFnE 19gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tesarici.cz header.s=mail header.b=XEO3TAJz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tesarici.cz Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id q15-20020a170902a3cf00b001c6182d7d43si6599916plb.21.2023.09.26.21.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 21:08:13 -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; dkim=pass header.i=@tesarici.cz header.s=mail header.b=XEO3TAJz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tesarici.cz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 14CF483014BE; Tue, 26 Sep 2023 12:23:17 -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 S235522AbjIZTXD (ORCPT + 99 others); Tue, 26 Sep 2023 15:23:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235695AbjIZTXB (ORCPT ); Tue, 26 Sep 2023 15:23:01 -0400 Received: from bee.tesarici.cz (bee.tesarici.cz [77.93.223.253]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D65411D for ; Tue, 26 Sep 2023 12:22:55 -0700 (PDT) Received: from meshulam.tesarici.cz (dynamic-2a00-1028-83b8-1e7a-4427-cc85-6706-c595.ipv6.o2.cz [IPv6:2a00:1028:83b8:1e7a:4427:cc85:6706:c595]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bee.tesarici.cz (Postfix) with ESMTPSA id 8CE9F1820AC; Tue, 26 Sep 2023 21:22:53 +0200 (CEST) Authentication-Results: mail.tesarici.cz; dmarc=fail (p=none dis=none) header.from=tesarici.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tesarici.cz; s=mail; t=1695756173; bh=MXZZPvWBYrRdnVtDy0NSVMWn0yB2k/fF634A/Y0Nhvc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XEO3TAJzMJJQZcOY+p9BZosiitw+bixBdP2sPB/lfqP+XTTQz9tKskBTYt98x9/AE KEmEMJbd3lxuMjYziNPa/rQyXfXsTYEEcH9pMKfm3mUke+5h7r2K/2FRaF6yLFr7Hy 9YMqDvOlxZC7ZNh5q8UH8NFDyXK3hl0NB3ywYzEPuug2JeV/11OzhiMTjibUHIuABQ ia3k9kisPYU0ag12u/qSrzU/4LlwvmXTcaV1vZ49XuqMmFEB+H1bmfV6HNzXRD40aE 137lYdRrpPoDjaXXkhxC3ApBx+WhMcPkIAll9YkUd+J+YZrC3VfmuLNdIBTy54sd29 tlkJ8DUzmwBdQ== Date: Tue, 26 Sep 2023 21:22:52 +0200 From: Petr =?UTF-8?B?VGVzYcWZw61r?= To: Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , linux-kernel@vger.kernel.org (open list) Cc: Catalin Marinas Subject: Re: [PATCH] checkpatch: warn about multi-line comments without an empty /* line Message-ID: <20230926212252.3e44bd22@meshulam.tesarici.cz> In-Reply-To: <20230926192006.18351-1-petr@tesarici.cz> References: <20230926192006.18351-1-petr@tesarici.cz> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 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:23:17 -0700 (PDT) V Tue, 26 Sep 2023 21:20:06 +0200 Petr Tesarik naps=C3=A1no: > According to Documentation/process/coding-style.rst, the preferred style > for multi-line comments outside net/ and drivers/net/ is: >=20 > .. code-block:: c >=20 > /* > * 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. > */ >=20 > Signed-off-by: Petr Tesarik > --- > scripts/checkpatch.pl | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 7d16f863edf1..0fc3427a9ec9 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -4006,6 +4006,14 @@ sub process { > "networking block comments don't use an empty /* line, use /* Co= mment...\n" . $hereprev); > } > =20 > +# Non-networking without an initial /* > + if ($realfile !~ m@^(drivers/net/|net/)@ && > + $prevrawline =3D~ /^\+[ \t]*\/\*.*[^ \t]$/ && > + $rawline =3D~ /^\+[ \t]*\*/) { > + WARN("MULTILINE_BLOCK_COMMENT_STYLE", Oops. This should be just BLOCK_COMMENT_STYLE, without MULTILINE; v2 is on the way... Petr T > + "multi-line block comments should start with an empty /* line\n"= . $hereprev); > + } > + > # Block comments use * on subsequent lines > if ($prevline =3D~ /$;[ \t]*$/ && #ends in comment > $prevrawline =3D~ /^\+.*?\/\*/ && #starting /*