Skip to contentSkip to conversation

staging: lustre: obdclass: fix sparse warnings about static declaration

PATCH Superseded Andrey Skvortsov 2 participants 2 messages Jul 23, 2014 – Jul 24, 2014 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: obdclass: fix sparse warnings about static declaration

---
 .../lustre/lustre/obdclass/linux/linux-sysctl.c    |   28 ++++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c +14 -14
index a4cd46b..7c6767b 100644
@@ -52,7 +52,7 @@
 #include "../../include/lprocfs_status.h"
 
 #ifdef CONFIG_SYSCTL
-struct ctl_table_header *obd_table_header = NULL;
+static struct ctl_table_header *obd_table_header;
 #endif
 
 
@@ -79,8 +79,8 @@ enum {
 };
 
 
-int proc_set_timeout(struct ctl_table *table, int write, void __user *buffer,
-		     size_t *lenp, loff_t *ppos)
+static int proc_set_timeout(struct ctl_table *table, int write,
+			void __user *buffer, size_t *lenp, loff_t *ppos)
 {
 	int rc;
 
@@ -90,8 +90,8 @@ int proc_set_timeout(struct ctl_table *table, int write, void __user *buffer,
 	return rc;
 }
 
-int proc_memory_alloc(struct ctl_table *table, int write, void __user *buffer,
-		      size_t *lenp, loff_t *ppos)
+static int proc_memory_alloc(struct ctl_table *table, int write,
+			void __user *buffer, size_t *lenp, loff_t *ppos)
 {
 	char buf[22];
 	int len;
@@ -114,8 +114,8 @@ int proc_memory_alloc(struct ctl_table *table, int write, void __user *buffer,
 	return 0;
 }
 
-int proc_pages_alloc(struct ctl_table *table, int write, void __user *buffer,
-		     size_t *lenp, loff_t *ppos)
+static int proc_pages_alloc(struct ctl_table *table, int write,
+			void __user *buffer, size_t *lenp, loff_t *ppos)
 {
 	char buf[22];
 	int len;
@@ -138,7 +138,7 @@ int proc_pages_alloc(struct ctl_table *table, int write, void __user *buffer,
 	return 0;
 }
 
-int proc_mem_max(struct ctl_table *table, int write, void __user *buffer,
+static int proc_mem_max(struct ctl_table *table, int write, void __user *buffer,
 		 size_t *lenp, loff_t *ppos)
 {
 	char buf[22];
@@ -162,8 +162,8 @@ int proc_mem_max(struct ctl_table *table, int write, void __user *buffer,
 	return 0;
 }
 
-int proc_pages_max(struct ctl_table *table, int write, void __user *buffer,
-		   size_t *lenp, loff_t *ppos)
+static int proc_pages_max(struct ctl_table *table, int write,
+			void __user *buffer, size_t *lenp, loff_t *ppos)
 {
 	char buf[22];
 	int len;
@@ -186,7 +186,7 @@ int proc_pages_max(struct ctl_table *table, int write, void __user *buffer,
 	return 0;
 }
 
-int proc_max_dirty_pages_in_mb(struct ctl_table *table, int write,
+static int proc_max_dirty_pages_in_mb(struct ctl_table *table, int write,
 			       void __user *buffer, size_t *lenp, loff_t *ppos)
 {
 	int rc = 0;
@@ -228,7 +228,7 @@ int proc_max_dirty_pages_in_mb(struct ctl_table *table, int write,
 	return rc;
 }
 
-int proc_alloc_fail_rate(struct ctl_table *table, int write,
+static int proc_alloc_fail_rate(struct ctl_table *table, int write,
 			 void __user *buffer, size_t *lenp, loff_t *ppos)
 {
 	int rc	  = 0;
@@ -388,7 +388,7 @@ static struct ctl_table parent_table[] = {
 };
 #endif
 
-void obd_sysctl_init(void)
+static void obd_sysctl_init(void)
 {
 #ifdef CONFIG_SYSCTL
 	if (!obd_table_header)
@@ -396,7 +396,7 @@ void obd_sysctl_init(void)
 #endif
 }
 
-void obd_sysctl_clean(void)
+static void obd_sysctl_clean(void)
 {
 #ifdef CONFIG_SYSCTL
 	if (obd_table_header)
Signature · 1 line
1.7.10.4
maintainer
#1 lore raw
Quoted 4 lines · Andrey Skvortsov
---
 .../lustre/lustre/obdclass/linux/linux-sysctl.c    |   28 ++++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)

You obviously did not build with your patch applied, otherwise you would not have sent it out :(

Please _ALWAYS_ test your patches, or end up with grumpy maintainers when you break their build...

greg k-h