2019-07-18 04:32:06

by Vasily Averin

[permalink] [raw]
Subject: [PATCH] connector: remove redundant input callback from cn_dev

A small cleanup: this callback is never used.
Originally fixed by Stanislav Kinsburskiy <[email protected]>
for OpenVZ7 bug OVZ-6877

cc: [email protected]
Signed-off-by: Vasily Averin <[email protected]>
---
drivers/connector/connector.c | 6 +-----
include/linux/connector.h | 1 -
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 23553ed6b548..2d22d6bf52f2 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -248,16 +248,12 @@ static int __maybe_unused cn_proc_show(struct seq_file *m, void *v)
return 0;
}

-static struct cn_dev cdev = {
- .input = cn_rx_skb,
-};
-
static int cn_init(void)
{
struct cn_dev *dev = &cdev;
struct netlink_kernel_cfg cfg = {
.groups = CN_NETLINK_USERS + 0xf,
- .input = dev->input,
+ .input = cn_rx_skb,
};

dev->nls = netlink_kernel_create(&init_net, NETLINK_CONNECTOR, &cfg);
diff --git a/include/linux/connector.h b/include/linux/connector.h
index 1d72ef76f24f..bc18f04e8b46 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -50,7 +50,6 @@ struct cn_dev {

u32 seq, groups;
struct sock *nls;
- void (*input) (struct sk_buff *skb);

struct cn_queue_dev *cbdev;
};
--
2.17.1


2019-07-21 20:35:44

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] connector: remove redundant input callback from cn_dev

From: Vasily Averin <[email protected]>
Date: Thu, 18 Jul 2019 07:26:46 +0300

> A small cleanup: this callback is never used.
> Originally fixed by Stanislav Kinsburskiy <[email protected]>
> for OpenVZ7 bug OVZ-6877
>
> cc: [email protected]
> Signed-off-by: Vasily Averin <[email protected]>

Applied.