netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] openvswitch: remove unused code
@ 2016-10-19  9:26 Jiri Benc
       [not found] ` <cover.1476869133.git.jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Benc @ 2016-10-19  9:26 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA; +Cc: dev-yBygre7rU0TnMu66kgdUjQ

Removed unused functions and unnecessary EXPORT_SYMBOLs from openvswitch.

Jiri Benc (2):
  openvswitch: remove unused functions
  openvswitch: remove unnecessary EXPORT_SYMBOLs

 net/openvswitch/datapath.c     |  2 --
 net/openvswitch/vport-netdev.c |  1 -
 net/openvswitch/vport.c        | 17 -----------------
 net/openvswitch/vport.h        |  1 -
 4 files changed, 21 deletions(-)

-- 
1.8.3.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH net-next v2 1/2] openvswitch: remove unused functions
       [not found] ` <cover.1476869133.git.jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-10-19  9:26   ` Jiri Benc
       [not found]     ` <75a1e9718357fe5c40948d4c3032c95278277587.1476869133.git.jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2016-10-19  9:26   ` [PATCH net-next v2 2/2] openvswitch: remove unnecessary EXPORT_SYMBOLs Jiri Benc
  2016-10-19 19:12   ` [PATCH net-next v2 0/2] openvswitch: remove unused code David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: Jiri Benc @ 2016-10-19  9:26 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA; +Cc: dev-yBygre7rU0TnMu66kgdUjQ

ovs_vport_deferred_free is not used anywhere. It's the only caller of
free_vport_rcu thus this one can be removed, too.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
---
new in v2
---
 net/openvswitch/vport.c | 16 ----------------
 net/openvswitch/vport.h |  1 -
 2 files changed, 17 deletions(-)

diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index 7387418ac514..9d0a87845843 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -465,22 +465,6 @@ int ovs_vport_receive(struct vport *vport, struct sk_buff *skb,
 }
 EXPORT_SYMBOL_GPL(ovs_vport_receive);
 
-static void free_vport_rcu(struct rcu_head *rcu)
-{
-	struct vport *vport = container_of(rcu, struct vport, rcu);
-
-	ovs_vport_free(vport);
-}
-
-void ovs_vport_deferred_free(struct vport *vport)
-{
-	if (!vport)
-		return;
-
-	call_rcu(&vport->rcu, free_vport_rcu);
-}
-EXPORT_SYMBOL_GPL(ovs_vport_deferred_free);
-
 static unsigned int packet_length(const struct sk_buff *skb)
 {
 	unsigned int length = skb->len - ETH_HLEN;
diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h
index f01f28a567ad..46e5b69927c7 100644
--- a/net/openvswitch/vport.h
+++ b/net/openvswitch/vport.h
@@ -149,7 +149,6 @@ struct vport_ops {
 struct vport *ovs_vport_alloc(int priv_size, const struct vport_ops *,
 			      const struct vport_parms *);
 void ovs_vport_free(struct vport *);
-void ovs_vport_deferred_free(struct vport *vport);
 
 #define VPORT_ALIGN 8
 
-- 
1.8.3.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next v2 2/2] openvswitch: remove unnecessary EXPORT_SYMBOLs
       [not found] ` <cover.1476869133.git.jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2016-10-19  9:26   ` [PATCH net-next v2 1/2] openvswitch: remove unused functions Jiri Benc
@ 2016-10-19  9:26   ` Jiri Benc
       [not found]     ` <4653b9825aa5e4047c4a91241dcafd1706171e80.1476869133.git.jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2016-10-19 19:12   ` [PATCH net-next v2 0/2] openvswitch: remove unused code David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: Jiri Benc @ 2016-10-19  9:26 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA; +Cc: dev-yBygre7rU0TnMu66kgdUjQ

Some symbols exported to other modules are really used only by
openvswitch.ko. Remove the exports.

Tested by loading all 4 openvswitch modules, nothing breaks.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
---
v2: ovs_vport_deferred_free is completely removed by the first patch
---
 net/openvswitch/datapath.c     | 2 --
 net/openvswitch/vport-netdev.c | 1 -
 net/openvswitch/vport.c        | 1 -
 3 files changed, 4 deletions(-)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 4d67ea856067..194435aa1165 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -59,7 +59,6 @@
 #include "vport-netdev.h"
 
 int ovs_net_id __read_mostly;
-EXPORT_SYMBOL_GPL(ovs_net_id);
 
 static struct genl_family dp_packet_genl_family;
 static struct genl_family dp_flow_genl_family;
@@ -131,7 +130,6 @@ int lockdep_ovsl_is_held(void)
 	else
 		return 1;
 }
-EXPORT_SYMBOL_GPL(lockdep_ovsl_is_held);
 #endif
 
 static struct vport *new_vport(const struct vport_parms *);
diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c
index 4e3972344aa6..e825753de1e0 100644
--- a/net/openvswitch/vport-netdev.c
+++ b/net/openvswitch/vport-netdev.c
@@ -162,7 +162,6 @@ void ovs_netdev_detach_dev(struct vport *vport)
 				netdev_master_upper_dev_get(vport->dev));
 	dev_set_promiscuity(vport->dev, -1);
 }
-EXPORT_SYMBOL_GPL(ovs_netdev_detach_dev);
 
 static void netdev_destroy(struct vport *vport)
 {
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index 9d0a87845843..9bb85b35a1fb 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -463,7 +463,6 @@ int ovs_vport_receive(struct vport *vport, struct sk_buff *skb,
 	ovs_dp_process_packet(skb, &key);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(ovs_vport_receive);
 
 static unsigned int packet_length(const struct sk_buff *skb)
 {
-- 
1.8.3.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next v2 1/2] openvswitch: remove unused functions
       [not found]     ` <75a1e9718357fe5c40948d4c3032c95278277587.1476869133.git.jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-10-19 18:34       ` Pravin Shelar
  0 siblings, 0 replies; 6+ messages in thread
From: Pravin Shelar @ 2016-10-19 18:34 UTC (permalink / raw)
  To: Jiri Benc; +Cc: ovs dev, Linux Kernel Network Developers

On Wed, Oct 19, 2016 at 2:26 AM, Jiri Benc <jbenc@redhat.com> wrote:
> ovs_vport_deferred_free is not used anywhere. It's the only caller of
> free_vport_rcu thus this one can be removed, too.
>
> Signed-off-by: Jiri Benc <jbenc@redhat.com>

Acked-by: Pravin B Shelar <pshelar@ovn.org>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next v2 2/2] openvswitch: remove unnecessary EXPORT_SYMBOLs
       [not found]     ` <4653b9825aa5e4047c4a91241dcafd1706171e80.1476869133.git.jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-10-19 18:34       ` Pravin Shelar
  0 siblings, 0 replies; 6+ messages in thread
From: Pravin Shelar @ 2016-10-19 18:34 UTC (permalink / raw)
  To: Jiri Benc; +Cc: ovs dev, Linux Kernel Network Developers

On Wed, Oct 19, 2016 at 2:26 AM, Jiri Benc <jbenc@redhat.com> wrote:
> Some symbols exported to other modules are really used only by
> openvswitch.ko. Remove the exports.
>
> Tested by loading all 4 openvswitch modules, nothing breaks.
>
> Signed-off-by: Jiri Benc <jbenc@redhat.com>

Acked-by: Pravin B Shelar <pshelar@ovn.org>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next v2 0/2] openvswitch: remove unused code
       [not found] ` <cover.1476869133.git.jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2016-10-19  9:26   ` [PATCH net-next v2 1/2] openvswitch: remove unused functions Jiri Benc
  2016-10-19  9:26   ` [PATCH net-next v2 2/2] openvswitch: remove unnecessary EXPORT_SYMBOLs Jiri Benc
@ 2016-10-19 19:12   ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2016-10-19 19:12 UTC (permalink / raw)
  To: jbenc-H+wXaHxf7aLQT0dZR+AlfA
  Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA

From: Jiri Benc <jbenc@redhat.com>
Date: Wed, 19 Oct 2016 11:26:35 +0200

> Removed unused functions and unnecessary EXPORT_SYMBOLs from openvswitch.

Series applied, thanks.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-10-19 19:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-19  9:26 [PATCH net-next v2 0/2] openvswitch: remove unused code Jiri Benc
     [not found] ` <cover.1476869133.git.jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-19  9:26   ` [PATCH net-next v2 1/2] openvswitch: remove unused functions Jiri Benc
     [not found]     ` <75a1e9718357fe5c40948d4c3032c95278277587.1476869133.git.jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-19 18:34       ` Pravin Shelar
2016-10-19  9:26   ` [PATCH net-next v2 2/2] openvswitch: remove unnecessary EXPORT_SYMBOLs Jiri Benc
     [not found]     ` <4653b9825aa5e4047c4a91241dcafd1706171e80.1476869133.git.jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-19 18:34       ` Pravin Shelar
2016-10-19 19:12   ` [PATCH net-next v2 0/2] openvswitch: remove unused code David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).