Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

genetlink: make genl_info->nlhdr const

struct netlink_callback has a const nlh pointer, make the
pointer in struct genl_info const as well, to make copying
between the two easier.

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20230814214723.2924989-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+3 -3
+1 -1
include/net/genetlink.h
··· 104 104 struct genl_info { 105 105 u32 snd_seq; 106 106 u32 snd_portid; 107 - struct nlmsghdr * nlhdr; 107 + const struct nlmsghdr * nlhdr; 108 108 struct genlmsghdr * genlhdr; 109 109 void * userhdr; 110 110 struct nlattr ** attrs;
+1 -1
net/ncsi/ncsi-netlink.c
··· 563 563 int ncsi_send_netlink_err(struct net_device *dev, 564 564 u32 snd_seq, 565 565 u32 snd_portid, 566 - struct nlmsghdr *nlhdr, 566 + const struct nlmsghdr *nlhdr, 567 567 int err) 568 568 { 569 569 struct nlmsghdr *nlh;
+1 -1
net/ncsi/ncsi-netlink.h
··· 19 19 int ncsi_send_netlink_err(struct net_device *dev, 20 20 u32 snd_seq, 21 21 u32 snd_portid, 22 - struct nlmsghdr *nlhdr, 22 + const struct nlmsghdr *nlhdr, 23 23 int err); 24 24 25 25 #endif /* __NCSI_NETLINK_H__ */