Skip to content

Commit 443cd88

Browse files
shemmingerjessegross
authored andcommitted
ovs: make functions local
Several functions and datastructures could be local Found with 'make namespacecheck' Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Jesse Gross <jesse@nicira.com>
1 parent 09c5e60 commit 443cd88

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

net/openvswitch/datapath.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static struct datapath *get_dp(struct net *net, int dp_ifindex)
132132
}
133133

134134
/* Must be called with rcu_read_lock or ovs_mutex. */
135-
const char *ovs_dp_name(const struct datapath *dp)
135+
static const char *ovs_dp_name(const struct datapath *dp)
136136
{
137137
struct vport *vport = ovs_vport_ovsl_rcu(dp, OVSP_LOCAL);
138138
return vport->ops->get_name(vport);
@@ -1466,7 +1466,7 @@ struct genl_family dp_vport_genl_family = {
14661466
.parallel_ops = true,
14671467
};
14681468

1469-
struct genl_multicast_group ovs_dp_vport_multicast_group = {
1469+
static struct genl_multicast_group ovs_dp_vport_multicast_group = {
14701470
.name = OVS_VPORT_MCGROUP
14711471
};
14721472

net/openvswitch/datapath.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,12 @@ static inline struct vport *ovs_vport_ovsl(const struct datapath *dp, int port_n
182182

183183
extern struct notifier_block ovs_dp_device_notifier;
184184
extern struct genl_family dp_vport_genl_family;
185-
extern struct genl_multicast_group ovs_dp_vport_multicast_group;
186185

187186
void ovs_dp_process_received_packet(struct vport *, struct sk_buff *);
188187
void ovs_dp_detach_port(struct vport *);
189188
int ovs_dp_upcall(struct datapath *, struct sk_buff *,
190189
const struct dp_upcall_info *);
191190

192-
const char *ovs_dp_name(const struct datapath *dp);
193191
struct sk_buff *ovs_vport_cmd_build_info(struct vport *, u32 pid, u32 seq,
194192
u8 cmd);
195193

net/openvswitch/vport.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
#include "vport.h"
3434
#include "vport-internal_dev.h"
3535

36+
static void ovs_vport_record_error(struct vport *,
37+
enum vport_err_type err_type);
38+
3639
/* List of statically compiled vport implementations. Don't forget to also
3740
* add yours to the list at the bottom of vport.h. */
3841
static const struct vport_ops *vport_ops_list[] = {
@@ -396,7 +399,8 @@ int ovs_vport_send(struct vport *vport, struct sk_buff *skb)
396399
* If using the vport generic stats layer indicate that an error of the given
397400
* type has occurred.
398401
*/
399-
void ovs_vport_record_error(struct vport *vport, enum vport_err_type err_type)
402+
static void ovs_vport_record_error(struct vport *vport,
403+
enum vport_err_type err_type)
400404
{
401405
spin_lock(&vport->stats_lock);
402406

net/openvswitch/vport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ static inline struct vport *vport_from_priv(const void *priv)
192192

193193
void ovs_vport_receive(struct vport *, struct sk_buff *,
194194
struct ovs_key_ipv4_tunnel *);
195-
void ovs_vport_record_error(struct vport *, enum vport_err_type err_type);
196195

197196
/* List of statically compiled vport implementations. Don't forget to also
198197
* add yours to the list at the top of vport.c. */

0 commit comments

Comments
 (0)