[ovs-dev] [PATCH 2/3] datapath: Mark functions "static".

Ben Pfaff blp at nicira.com
Thu Feb 11 00:55:03 UTC 2010


Found by sparse (http://sparse.wiki.kernel.org/).
---
 datapath/brc_procfs.c |    5 +++--
 datapath/datapath.c   |    6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/datapath/brc_procfs.c b/datapath/brc_procfs.c
index ae4a4f5..cfe0175 100644
--- a/datapath/brc_procfs.c
+++ b/datapath/brc_procfs.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
  * Distributed under the terms of the GNU GPL version 2.
  *
  * Significant portions of this file may be copied from parts of the Linux
@@ -12,6 +12,7 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <net/genetlink.h>
+#include "brc_procfs.h"
 #include "openvswitch/brcompat-netlink.h"
 
 /* This code implements a Generic Netlink command BRC_GENL_C_SET_PROC that can
@@ -49,7 +50,7 @@ static struct file_operations brc_fops = {
 static struct proc_dir_entry *proc_vlan_dir;
 static struct proc_dir_entry *proc_bonding_dir;
 
-struct proc_dir_entry *brc_lookup_entry(struct proc_dir_entry *de, const char *name)
+static struct proc_dir_entry *brc_lookup_entry(struct proc_dir_entry *de, const char *name)
 {
 	int namelen = strlen(name);
 	for (de = de->subdir; de; de = de->next) {
diff --git a/datapath/datapath.c b/datapath/datapath.c
index 94f3196..9f415ac 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -81,7 +81,7 @@ struct datapath *get_dp(int dp_idx)
 }
 EXPORT_SYMBOL_GPL(get_dp);
 
-struct datapath *get_dp_locked(int dp_idx)
+static struct datapath *get_dp_locked(int dp_idx)
 {
 	struct datapath *dp;
 
@@ -176,7 +176,7 @@ static void release_dp(struct kobject *kobj)
 	kfree(dp);
 }
 
-struct kobj_type dp_ktype = {
+static struct kobj_type dp_ktype = {
 	.release = release_dp
 };
 
@@ -325,7 +325,7 @@ static void release_nbp(struct kobject *kobj)
 	kfree(p);
 }
 
-struct kobj_type brport_ktype = {
+static struct kobj_type brport_ktype = {
 #ifdef CONFIG_SYSFS
 	.sysfs_ops = &brport_sysfs_ops,
 #endif
-- 
1.6.6.1





More information about the dev mailing list