Re: [PATCH net-next 3/3] net: dropreason: reformat the comment fo skb drop reasons

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 28, 2022 at 9:19 AM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Fri, 27 May 2022 15:15:22 +0800 menglong8.dong@xxxxxxxxx wrote:
> > From: Menglong Dong <imagedong@xxxxxxxxxxx>
> >
> > To make the code clear, reformat the comment in dropreason.h to k-doc
> > style.
> >
> > Now, the comment can pass the check of kernel-doc without warnning:
> >
> > $ ./scripts/kernel-doc -v -none include/linux/dropreason.h
> > include/linux/dropreason.h:7: info: Scanning doc for enum skb_drop_reason
> >
> > Signed-off-by: Menglong Dong <imagedong@xxxxxxxxxxx>
>
> I feel bad for suggesting this after you reformatted all the values
> but could we use inline notation here? With a huge enum like this
> there's a lot of scrolling between documentation and the value.
>
> /**
>  * enum skb_drop_reason - the reasons of skb drops
>  *
>  * The reason of skb drop, which is used in kfree_skb_reason().
>  * en...maybe they should be splited by group?
>  */
>  enum skb_drop_reason {
>         /**
>          * @SKB_NOT_DROPPED_YET: skb is not dropped yet (used for no-drop case)
>          */
>         SKB_NOT_DROPPED_YET = 0,
>         /** @SKB_DROP_REASON_NOT_SPECIFIED: drop reason is not specified */
>         SKB_DROP_REASON_NOT_SPECIFIED,
>         /** @SKB_DROP_REASON_NO_SOCKET: socket not found */
>         SKB_DROP_REASON_NO_SOCKET,
> ...

The inline comment is an option, which I thought of. But I found it
makes the code a little not tidy. Of course, inline comments are
easier to read. Anyway, I'll have a try and make them inline.

Thanks!
Menglong Dong



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux