Commit fde9bd4a authored by Jakub Kicinski's avatar Jakub Kicinski

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: default avatarJiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20230814214723.2924989-3-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 84817d8c
...@@ -104,7 +104,7 @@ struct genl_family { ...@@ -104,7 +104,7 @@ struct genl_family {
struct genl_info { struct genl_info {
u32 snd_seq; u32 snd_seq;
u32 snd_portid; u32 snd_portid;
struct nlmsghdr * nlhdr; const struct nlmsghdr * nlhdr;
struct genlmsghdr * genlhdr; struct genlmsghdr * genlhdr;
void * userhdr; void * userhdr;
struct nlattr ** attrs; struct nlattr ** attrs;
......
...@@ -563,7 +563,7 @@ int ncsi_send_netlink_timeout(struct ncsi_request *nr, ...@@ -563,7 +563,7 @@ int ncsi_send_netlink_timeout(struct ncsi_request *nr,
int ncsi_send_netlink_err(struct net_device *dev, int ncsi_send_netlink_err(struct net_device *dev,
u32 snd_seq, u32 snd_seq,
u32 snd_portid, u32 snd_portid,
struct nlmsghdr *nlhdr, const struct nlmsghdr *nlhdr,
int err) int err)
{ {
struct nlmsghdr *nlh; struct nlmsghdr *nlh;
......
...@@ -19,7 +19,7 @@ int ncsi_send_netlink_timeout(struct ncsi_request *nr, ...@@ -19,7 +19,7 @@ int ncsi_send_netlink_timeout(struct ncsi_request *nr,
int ncsi_send_netlink_err(struct net_device *dev, int ncsi_send_netlink_err(struct net_device *dev,
u32 snd_seq, u32 snd_seq,
u32 snd_portid, u32 snd_portid,
struct nlmsghdr *nlhdr, const struct nlmsghdr *nlhdr,
int err); int err);
#endif /* __NCSI_NETLINK_H__ */ #endif /* __NCSI_NETLINK_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment