connector: remove redundant input callback from cn_dev
diff mbox series

Message ID 1f53c1fb-c42e-fb78-7b2b-ad6c4712fe72@virtuozzo.com
State Accepted
Delegated to: David Miller
Headers show
Series
  • connector: remove redundant input callback from cn_dev
Related show

Commit Message

Vasily Averin July 18, 2019, 4:26 a.m. UTC
A small cleanup: this callback is never used.
Originally fixed by Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
for OpenVZ7 bug OVZ-6877

cc: stanislav.kinsburskiy@gmail.com
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
 drivers/connector/connector.c | 6 +-----
 include/linux/connector.h     | 1 -
 2 files changed, 1 insertion(+), 6 deletions(-)

Comments

David Miller July 21, 2019, 8:31 p.m. UTC | #1
From: Vasily Averin <vvs@virtuozzo.com>
Date: Thu, 18 Jul 2019 07:26:46 +0300

> A small cleanup: this callback is never used.
> Originally fixed by Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
> for OpenVZ7 bug OVZ-6877
> 
> cc: stanislav.kinsburskiy@gmail.com
> Signed-off-by: Vasily Averin <vvs@virtuozzo.com>

Applied.

Patch
diff mbox series

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;
 };