[openib-general] [PATCH][SDP][14/22] Remove use of leading underscores in static names in sdp_proc.c

Tom Duffy Tom.Duffy at Sun.COM
Mon Feb 28 14:02:23 PST 2005


Signed-off-by: Tom Duffy <tduffy at sun.com>

Index: drivers/infiniband/ulp/sdp/sdp_proc.c
===================================================================
--- drivers/infiniband/ulp/sdp/sdp_proc.c	(revision 1929)
+++ drivers/infiniband/ulp/sdp/sdp_proc.c	(working copy)
@@ -34,22 +34,18 @@
 
 #include "sdp_main.h"
 
-static const char _dir_name_root[] = SDP_PROC_DIR_NAME;
-static struct proc_dir_entry *_dir_root = NULL;
+static const char dir_name_root[] = SDP_PROC_DIR_NAME;
+static struct proc_dir_entry *dir_root = NULL;
 
 /*
  * Generic static functions used by read/write functions
  */
 
 /*
- * _sdp_proc_read_parse - read function for the injection table
+ * sdp_proc_read_parse - read function for the injection table
  */
-static int _sdp_proc_read_parse(char *page,
-				char **start, 
-				off_t offset,
-				int count,
-				int *eof,
-				void *data)
+static int sdp_proc_read_parse(char *page, char **start, off_t offset,
+			       int count, int *eof, void *data)
 {
 	struct sdpc_proc_ent *sub_entry = (struct sdpc_proc_ent *)data;
 	long end_index = 0;
@@ -142,15 +138,15 @@ int sdp_main_proc_cleanup(void)
 	for (counter = 0; counter < SDP_PROC_ENTRIES; counter++) {
 		sub_entry = &_file_entry_list[counter];
 		if (sub_entry->entry) {
-			remove_proc_entry(sub_entry->name, _dir_root);
+			remove_proc_entry(sub_entry->name, dir_root);
 			sub_entry->entry = NULL;
 		}
 	}
 	/*
 	 * remove SDP directory
 	 */
-	remove_proc_entry(_dir_name_root, proc_net);
-	_dir_root = NULL;
+	remove_proc_entry(dir_name_root, proc_net);
+	dir_root = NULL;
 
 	sdp_dbg_init("/proc filesystem cleanup complete.");
 
@@ -177,21 +173,20 @@ int sdp_main_proc_init(void)
 		return -EFAULT;
 	}
 
-	if (_dir_root) {
+	if (dir_root) {
 		sdp_warn("/proc already initialized!");
 		return -EINVAL;
 	}
 	/*
 	 * create a gateway root, and main directories
 	 */
-	_dir_root = proc_mkdir(_dir_name_root, proc_net);
-	if (!_dir_root) {
-		sdp_warn("Failed to create <%s> proc entry.",
-			 _dir_name_root);
+	dir_root = proc_mkdir(dir_name_root, proc_net);
+	if (!dir_root) {
+		sdp_warn("Failed to create <%s> proc entry.", dir_name_root);
 		return -EINVAL;
 	}
 
-	_dir_root->owner = THIS_MODULE;
+	dir_root->owner = THIS_MODULE;
 
 	for (counter = 0; counter < SDP_PROC_ENTRIES; counter++) {
 		sub_entry = &_file_entry_list[counter];
@@ -202,7 +197,7 @@ int sdp_main_proc_init(void)
 
 		sub_entry->entry = create_proc_entry(sub_entry->name,
 						     S_IRUGO | S_IWUGO,
-						     _dir_root);
+						     dir_root);
 		if (!sub_entry->entry) {
 			sdp_warn("Failed to create <%s> framework proc entry.",
 				 sub_entry->name);
@@ -210,7 +205,7 @@ int sdp_main_proc_init(void)
 			goto error;
 		}
 
-		sub_entry->entry->read_proc = _sdp_proc_read_parse;
+		sub_entry->entry->read_proc = sdp_proc_read_parse;
 		sub_entry->entry->data = sub_entry;
 		sub_entry->entry->owner = THIS_MODULE;
 	}




More information about the general mailing list