[RFC net-next 10/14] wireguard: netlink: rename netlink handlers

Asbjørn Sloth Tønnesen <[email protected]>
Newsgroups com.zx2c4.lists.wireguard,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
Rename netlink handlers to use the naming expected by ynl-gen.

This is an incremental step towards adopting netlink command
definitions generated by ynl-gen.

This is a trivial patch with no behavioural changes intended.

Signed-off-by: Asbjørn Sloth Tønnesen <[email protected]>
---
 drivers/net/wireguard/netlink.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireguard/netlink.c b/drivers/net/wireguard/netlink.c
index 1311f64d9fcf..a61e1c5c7850 100644
--- a/drivers/net/wireguard/netlink.c
+++ b/drivers/net/wireguard/netlink.c
@@ -197,7 +197,7 @@ get_peer(struct wg_peer *peer, struct sk_buff *skb, struct dump_ctx *ctx)
 	return -EMSGSIZE;
 }
 
-static int wg_get_device_start(struct netlink_callback *cb)
+static int wireguard_nl_get_device_start(struct netlink_callback *cb)
 {
 	struct wg_device *wg;
 
@@ -208,7 +208,8 @@ static int wg_get_device_start(struct netlink_callback *cb)
 	return 0;
 }
 
-static int wg_get_device_dump(struct sk_buff *skb, struct netlink_callback *cb)
+static int wireguard_nl_get_device_dumpit(struct sk_buff *skb,
+					  struct netlink_callback *cb)
 {
 	struct wg_peer *peer, *next_peer_cursor;
 	struct dump_ctx *ctx = DUMP_CTX(cb);
@@ -302,7 +303,7 @@ static int wg_get_device_dump(struct sk_buff *skb, struct netlink_callback *cb)
 	 */
 }
 
-static int wg_get_device_done(struct netlink_callback *cb)
+static int wireguard_nl_get_device_done(struct netlink_callback *cb)
 {
 	struct dump_ctx *ctx = DUMP_CTX(cb);
 
@@ -500,7 +501,8 @@ static int set_peer(struct wg_device *wg, struct nlattr **attrs)
 	return ret;
 }
 
-static int wg_set_device(struct sk_buff *skb, struct genl_info *info)
+static int wireguard_nl_set_device_doit(struct sk_buff *skb,
+					struct genl_info *info)
 {
 	struct wg_device *wg = lookup_interface(info->attrs, skb);
 	u32 flags = 0;
@@ -617,15 +619,15 @@ static int wg_set_device(struct sk_buff *skb, struct genl_info *info)
 static const struct genl_split_ops wireguard_nl_ops[] = {
 	{
 		.cmd = WG_CMD_GET_DEVICE,
-		.start = wg_get_device_start,
-		.dumpit = wg_get_device_dump,
-		.done = wg_get_device_done,
+		.start = wireguard_nl_get_device_start,
+		.dumpit = wireguard_nl_get_device_dumpit,
+		.done = wireguard_nl_get_device_done,
 		.policy = device_policy,
 		.maxattr = WGDEVICE_A_PEERS,
 		.flags = GENL_UNS_ADMIN_PERM | GENL_CMD_CAP_DUMP,
 	}, {
 		.cmd = WG_CMD_SET_DEVICE,
-		.doit = wg_set_device,
+		.doit = wireguard_nl_set_device_doit,
 		.policy = device_policy,
 		.maxattr = WGDEVICE_A_PEERS,
 		.flags = GENL_UNS_ADMIN_PERM | GENL_CMD_CAP_DO,
-- 
2.51.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.