From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
jiri@resnulli.us, johannes@sipsolutions.net,
Jakub Kicinski <kuba@kernel.org>,
sam@mendozajonas.com
Subject: [PATCH net-next 02/10] genetlink: make genl_info->nlhdr const
Date: Wed, 9 Aug 2023 11:26:40 -0700 [thread overview]
Message-ID: <20230809182648.1816537-3-kuba@kernel.org> (raw)
In-Reply-To: <20230809182648.1816537-1-kuba@kernel.org>
struct netlink_callback has a const nlh pointer, make info
pointer const as well, to make setting genl_info->nlh in
dumps easier.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: sam@mendozajonas.com
---
include/net/genetlink.h | 2 +-
net/ncsi/ncsi-netlink.c | 2 +-
net/ncsi/ncsi-netlink.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index ed4622dd4828..0366d0925596 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -104,7 +104,7 @@ struct genl_family {
struct genl_info {
u32 snd_seq;
u32 snd_portid;
- struct nlmsghdr * nlhdr;
+ const struct nlmsghdr * nlhdr;
struct genlmsghdr * genlhdr;
void * userhdr;
struct nlattr ** attrs;
diff --git a/net/ncsi/ncsi-netlink.c b/net/ncsi/ncsi-netlink.c
index d27f4eccce6d..a3a6753a1db7 100644
--- a/net/ncsi/ncsi-netlink.c
+++ b/net/ncsi/ncsi-netlink.c
@@ -563,7 +563,7 @@ int ncsi_send_netlink_timeout(struct ncsi_request *nr,
int ncsi_send_netlink_err(struct net_device *dev,
u32 snd_seq,
u32 snd_portid,
- struct nlmsghdr *nlhdr,
+ const struct nlmsghdr *nlhdr,
int err)
{
struct nlmsghdr *nlh;
diff --git a/net/ncsi/ncsi-netlink.h b/net/ncsi/ncsi-netlink.h
index 39a1a9d7bf77..747767ea0aae 100644
--- a/net/ncsi/ncsi-netlink.h
+++ b/net/ncsi/ncsi-netlink.h
@@ -19,7 +19,7 @@ int ncsi_send_netlink_timeout(struct ncsi_request *nr,
int ncsi_send_netlink_err(struct net_device *dev,
u32 snd_seq,
u32 snd_portid,
- struct nlmsghdr *nlhdr,
+ const struct nlmsghdr *nlhdr,
int err);
#endif /* __NCSI_NETLINK_H__ */
--
2.41.0
next prev parent reply other threads:[~2023-08-09 18:26 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 18:26 [PATCH net-next 00/10] genetlink: provide struct genl_info to dumps Jakub Kicinski
2023-08-09 18:26 ` [PATCH net-next 01/10] genetlink: use push conditional locking info dumpit/done Jakub Kicinski
2023-08-09 20:56 ` Johannes Berg
2023-08-10 6:54 ` Jiri Pirko
2023-08-09 18:26 ` Jakub Kicinski [this message]
2023-08-10 8:22 ` [PATCH net-next 02/10] genetlink: make genl_info->nlhdr const Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 03/10] genetlink: remove userhdr from struct genl_info Jakub Kicinski
2023-08-09 18:26 ` [Drbd-dev] " Jakub Kicinski
2023-08-09 20:59 ` Johannes Berg
2023-08-09 20:59 ` [Drbd-dev] " Johannes Berg
2023-08-09 22:02 ` Jakub Kicinski
2023-08-09 22:02 ` [Drbd-dev] " Jakub Kicinski
2023-08-10 8:26 ` Jiri Pirko
2023-08-10 8:26 ` [Drbd-dev] " Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 04/10] genetlink: add struct genl_info to struct genl_dumpit_info Jakub Kicinski
2023-08-10 8:33 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 05/10] genetlink: use attrs from struct genl_info Jakub Kicinski
2023-08-09 21:04 ` Johannes Berg
2023-08-10 6:17 ` Miquel Raynal
2023-08-10 8:35 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 06/10] genetlink: add a family pointer to " Jakub Kicinski
2023-08-09 18:26 ` [PATCH net-next 07/10] genetlink: add genlmsg_iput() API Jakub Kicinski
2023-08-10 9:07 ` Jiri Pirko
2023-08-10 16:13 ` Jakub Kicinski
2023-08-10 16:42 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 08/10] netdev-genl: use struct genl_info for reply construction Jakub Kicinski
2023-08-10 9:10 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 09/10] ethtool: netlink: simplify arguments to ethnl_default_parse() Jakub Kicinski
2023-08-10 9:12 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 10/10] ethtool: netlink: always pass genl_info to .prepare_data Jakub Kicinski
2023-08-10 18:40 ` Vladimir Oltean
2023-08-10 8:30 ` [PATCH net-next 00/10] genetlink: provide struct genl_info to dumps Jiri Pirko
2023-08-10 16:14 ` Jakub Kicinski
2023-08-10 16:43 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230809182648.1816537-3-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=johannes@sipsolutions.net \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sam@mendozajonas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.