From nobody Sun Feb 8 23:06:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2DF5D32B98F; Tue, 13 Jan 2026 17:20:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768324802; cv=none; b=JnZ/XbNUc+5ppE4BHAsdftgV5/nImErfmn2ANz0xaperiklueOfjVSqTJawRbHiSlPv5bZ/7AkrUxMXUOig4D0oCiFXdY9AJH12SftzlC6m8FD2H240DG2KwTXBMpEUQ4vX1WAc/Jth4iWsKoR0WOynWc6rXnW6zGL9IOSUj3Aw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768324802; c=relaxed/simple; bh=2m6TV9TmCb8dmWC8RNmdbds1yQ7T9JqcpLqXcM2+DNA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BikPkYyfKRC29yuO8395FNdp1ntZ/XwOlRhxXUP7fzbTMxCz101D396xH5i+S0XzXJ+10r+mKF+B09BdJvevuXy+cyZ9CMovVIBbXpjEwX6d5i+UjC8ofGyCrmquY4S+VGy457pqa3lilN/+zPwpLSoh9LNyMwAMUqkO4xINR4w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YpUAVV07; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YpUAVV07" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8223C4AF0C; Tue, 13 Jan 2026 17:20:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768324801; bh=2m6TV9TmCb8dmWC8RNmdbds1yQ7T9JqcpLqXcM2+DNA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YpUAVV078V6+5O6pPjAW4daEBUuna0/7o0qBfhQtnBwPEylvFjqT4S4rKg0L1zTPd r5JGwGZ7Is3Is6umlwV6523mfqet8niK84IuPxeqLOAQikYAYBKpQ01q3+Dy9TpHHt FC6fS7he8Oyqli2I1SJiv/Oh0RLCKlcqpDEfttQfepmBum3jEtj2bXs31rWyNYp6/v UXEtn3uDOloI/qe/IXy5KWlppWWdMPdElaMfphkX1uxPz7Ar74dXiQG8qJ2UDDS1T/ h8Q6ZtHYUBlNI94vL2u5ZKApIw/vyAD8v6I2X/4HYs54cN4MHfW+RjYXe2hIHjmfb+ dxIs6ZfeS7G1A== Received: from mchehab by mail.kernel.org with local (Exim 4.99) (envelope-from ) id 1vfi3j-00000000zeG-3WOy; Tue, 13 Jan 2026 18:19:59 +0100 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jani Nikula , Mauro Carvalho Chehab , Shuah Khan Subject: [PATCH v3 3/4] scripts/kernel-doc: ensure that comments are using our coding style Date: Tue, 13 Jan 2026 18:19:55 +0100 Message-ID: <55357e0465e1a73c64f875f4b45c6d443b33ab38.1768324572.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Along kernel-doc libs, we opted to have all comments starting/ending with a blank comment line. Use the same style here. Signed-off-by: Mauro Carvalho Chehab --- scripts/kernel-doc.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/scripts/kernel-doc.py b/scripts/kernel-doc.py index 5d2f29e90ebe..da06184cbd8b 100755 --- a/scripts/kernel-doc.py +++ b/scripts/kernel-doc.py @@ -3,7 +3,7 @@ # Copyright(c) 2025: Mauro Carvalho Chehab . # # pylint: disable=3DC0103,R0912,R0914,R0915 - +# # NOTE: While kernel-doc requires at least version 3.6 to run, the # command line should work with Python 3.2+ (tested with 3.4). # The rationale is that it shall fail gracefully during Kernel @@ -12,7 +12,7 @@ # - no f-strings can be used on this file. # - the libraries that require newer versions can only be included # after Python version is checked. - +# # Converted from the kernel-doc script originally written in Perl # under GPLv2, copyrighted since 1998 by the following authors: # @@ -197,8 +197,9 @@ def main(): parser =3D argparse.ArgumentParser(formatter_class=3Dargparse.RawTextH= elpFormatter, description=3DDESC) =20 + # # Normal arguments - + # parser.add_argument("-v", "-verbose", "--verbose", action=3D"store_tru= e", help=3D"Verbose output, more warnings and other in= formation.") =20 @@ -213,8 +214,9 @@ def main(): action=3D"store_true", help=3D"Enable line number output (only in ReST mo= de)") =20 + # # Arguments to control the warning behavior - + # parser.add_argument("-Wreturn", "--wreturn", action=3D"store_true", help=3D"Warns about the lack of a return markup on= functions.") =20 @@ -235,8 +237,9 @@ def main(): parser.add_argument("-export-file", "--export-file", action=3D'append', help=3DEXPORT_FILE_DESC) =20 + # # Output format mutually-exclusive group - + # out_group =3D parser.add_argument_group("Output format selection (mutu= ally exclusive)") =20 out_fmt =3D out_group.add_mutually_exclusive_group() @@ -248,8 +251,9 @@ def main(): out_fmt.add_argument("-N", "-none", "--none", action=3D"store_true", help=3D"Do not output documentation, only warning= s.") =20 + # # Output selection mutually-exclusive group - + # sel_group =3D parser.add_argument_group("Output selection (mutually ex= clusive)") sel_mut =3D sel_group.add_mutually_exclusive_group() =20 @@ -262,7 +266,9 @@ def main(): sel_mut.add_argument("-s", "-function", "--symbol", action=3D'append', help=3DFUNCTION_DESC) =20 + # # Those are valid for all 3 types of filter + # parser.add_argument("-n", "-nosymbol", "--nosymbol", action=3D'append', help=3DNOSYMBOL_DESC) =20 @@ -295,9 +301,11 @@ def main(): =20 python_ver =3D sys.version_info[:2] if python_ver < (3,6): + # # Depending on Kernel configuration, kernel-doc --none is called at # build time. As we don't want to break compilation due to the # usage of an old Python version, return 0 here. + # if args.none: logger.error("Python 3.6 or later is required by kernel-doc. s= kipping checks") sys.exit(0) @@ -307,7 +315,9 @@ def main(): if python_ver < (3,7): logger.warning("Python 3.7 or later is required for correct result= s") =20 + # # Import kernel-doc libraries only after checking Python version + # from kdoc.kdoc_files import KernelFiles # pylint: disable= =3DC0415 from kdoc.kdoc_output import RestFormat, ManFormat # pylint: disable= =3DC0415 =20 @@ -346,6 +356,8 @@ def main(): =20 sys.exit(0) =20 +# # Call main method +# if __name__ =3D=3D "__main__": main() --=20 2.52.0