diff mbox series

[net-next,2/4] ynl: mark max/mask as private for kdoc

Message ID 20230725233517.2614868-3-sdf@google.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series ynl: couple of unrelated fixes | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Stanislav Fomichev July 25, 2023, 11:35 p.m. UTC
Simon mentioned in another thread that it makes kdoc happy
and Jakub confirms that commit e27cb89a22ad ("scripts: kernel-doc: support
private / public marking for enums") actually added the needed
support.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
---
 tools/net/ynl/ynl-gen-c.py | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jakub Kicinski July 26, 2023, 11:33 p.m. UTC | #1
On Tue, 25 Jul 2023 16:35:15 -0700 Stanislav Fomichev wrote:
> +                cw.p('/* private: */')
>                  cw.nl()

I was about to apply but I keep having doubts whether there should 
be a new line after the private marker. I know - a very important
question :D

Quick grep of

$ git grep -A1 '\* private:'

shows that all(?) current uses have something immediately following
the comment.
Stanislav Fomichev July 26, 2023, 11:35 p.m. UTC | #2
On Wed, Jul 26, 2023 at 4:33 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 25 Jul 2023 16:35:15 -0700 Stanislav Fomichev wrote:
> > +                cw.p('/* private: */')
> >                  cw.nl()
>
> I was about to apply but I keep having doubts whether there should
> be a new line after the private marker. I know - a very important
> question :D
>
> Quick grep of
>
> $ git grep -A1 '\* private:'
>
> shows that all(?) current uses have something immediately following
> the comment.

:-D I was too lazy to grep. Will drop \n and respin!
diff mbox series

Patch

diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py
index 71c5e79e877f..0112722fcc37 100755
--- a/tools/net/ynl/ynl-gen-c.py
+++ b/tools/net/ynl/ynl-gen-c.py
@@ -2124,6 +2124,8 @@  _C_KW = {
                 cw.p(entry.c_name + suffix)
 
             if const.get('render-max', False):
+                cw.nl()
+                cw.p('/* private: */')
                 cw.nl()
                 if const['type'] == 'flags':
                     max_name = c_upper(name_pfx + 'mask')