Skip to content

Commit 30b6055

Browse files
committed
net: improve and fix netlink kdoc
Subsequent patch will render the kdoc from include/uapi/linux/netlink.h into Documentation. We need to fix the warnings. While at it move the comments on struct nlmsghdr to a proper kdoc comment. Link: https://lore.kernel.org/r/20220819200221.422801-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 6c2c782 commit 30b6055

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

include/uapi/linux/netlink.h

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,20 @@ struct sockaddr_nl {
4141
__u32 nl_groups; /* multicast groups mask */
4242
};
4343

44+
/**
45+
* struct nlmsghdr - fixed format metadata header of Netlink messages
46+
* @nlmsg_len: Length of message including header
47+
* @nlmsg_type: Message content type
48+
* @nlmsg_flags: Additional flags
49+
* @nlmsg_seq: Sequence number
50+
* @nlmsg_pid: Sending process port ID
51+
*/
4452
struct nlmsghdr {
45-
__u32 nlmsg_len; /* Length of message including header */
46-
__u16 nlmsg_type; /* Message content */
47-
__u16 nlmsg_flags; /* Additional flags */
48-
__u32 nlmsg_seq; /* Sequence number */
49-
__u32 nlmsg_pid; /* Sending process port ID */
53+
__u32 nlmsg_len;
54+
__u16 nlmsg_type;
55+
__u16 nlmsg_flags;
56+
__u32 nlmsg_seq;
57+
__u32 nlmsg_pid;
5058
};
5159

5260
/* Flags values */
@@ -337,6 +345,9 @@ enum netlink_attribute_type {
337345
* bitfield32 type (U32)
338346
* @NL_POLICY_TYPE_ATTR_MASK: mask of valid bits for unsigned integers (U64)
339347
* @NL_POLICY_TYPE_ATTR_PAD: pad attribute for 64-bit alignment
348+
*
349+
* @__NL_POLICY_TYPE_ATTR_MAX: number of attributes
350+
* @NL_POLICY_TYPE_ATTR_MAX: highest attribute number
340351
*/
341352
enum netlink_policy_type_attr {
342353
NL_POLICY_TYPE_ATTR_UNSPEC,

0 commit comments

Comments
 (0)