From: Randy Dunlap <rdunlap@infradead.org>
To: Jakub Kicinski <kuba@kernel.org>, corbet@lwn.net
Cc: linux-doc@vger.kernel.org, arkadiusz.kubalewski@intel.com,
netdev@vger.kernel.org
Subject: Re: [PATCH docs] scripts: kernel-doc: support private / public marking for enums
Date: Wed, 21 Jun 2023 20:10:24 -0700 [thread overview]
Message-ID: <399c98c8-fbf5-8b90-d343-e25697b2e6fa@infradead.org> (raw)
In-Reply-To: <20230621223525.2722703-1-kuba@kernel.org>
On 6/21/23 15:35, Jakub Kicinski wrote:
> Enums benefit from private markings, too. For netlink attribute
> name enums always end with a pair of __$n_MAX and $n_MAX members.
> Documenting them feels a bit tedious.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> Hi Jon, we've CCed you recently on a related discussion
> but it appears that the fix is simple enough so posting
> it before you had a chance to reply.
> ---
> scripts/kernel-doc | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> index 2486689ffc7b..66b554897899 100755
> --- a/scripts/kernel-doc
> +++ b/scripts/kernel-doc
> @@ -1301,6 +1301,9 @@ sub dump_enum($$) {
> my $file = shift;
> my $members;
>
> + # ignore members marked private:
> + $x =~ s/\/\*\s*private:.*?\/\*\s*public:.*?\*\///gosi;
> + $x =~ s/\/\*\s*private:.*}/}/gosi;
>
> $x =~ s@/\*.*?\*/@@gos; # strip comments.
> # strip #define macros inside enums
--
~Randy
next prev parent reply other threads:[~2023-06-22 3:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 22:35 [PATCH docs] scripts: kernel-doc: support private / public marking for enums Jakub Kicinski
2023-06-22 3:10 ` Randy Dunlap [this message]
2023-07-14 5:03 ` Randy Dunlap
2023-07-14 13:29 ` Jonathan Corbet
2023-07-14 15:15 ` Randy Dunlap
2023-07-16 0:35 ` Randy Dunlap
2023-07-03 16:48 ` Jonathan Corbet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=399c98c8-fbf5-8b90-d343-e25697b2e6fa@infradead.org \
--to=rdunlap@infradead.org \
--cc=arkadiusz.kubalewski@intel.com \
--cc=corbet@lwn.net \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).