Skip to contentSkip to conversation

usbip: change match_busid() to local function

PATCH In review Németh Márton 2 participants 4 messages May 30, 2011 – Jun 8, 2011 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usbip: change match_busid() to local function

From: Márton Németh <[email protected]>

The function match_busid() is only referenced in the stub_main.c so it can be changed to static. This will remove the following warning when compiling with "make W=1 ...":

* drivers/staging/usbip/stub_main.c:40: warning: no previous prototype for ‘match_busid’

---

drivers/staging/usbip/stub_main.c +1 -1
index e9085d6..fc5b829 100644
@@ -37,7 +37,7 @@ struct kmem_cache *stub_priv_cache;
 static struct bus_id_priv busid_table[MAX_BUSID];
 static spinlock_t busid_table_lock;
 
-int match_busid(const char *busid)
+static int match_busid(const char *busid)
 {
 	int i;
 
#1 lore raw
Quoted 8 lines · Németh Márton

From: Márton Németh <[email protected]>

The function match_busid() is only referenced in the stub_main.c so it can be changed to static. This will remove the following warning when compiling with "make W=1 ...":

* drivers/staging/usbip/stub_main.c:40: warning: no previous prototype for ‘match_busid’

This no longer applies, care to redo it against the next linux-next tree that comes out?

thanks,

greg k-h

#2 lore raw

From: Márton Németh <[email protected]>

The function match_busid() is only referenced in the stub_main.c so it can be changed to static. This will remove the following warning when compiling with "make W=1 ...":
* drivers/staging/usbip/stub_main.c:40: warning: no previous prototype for ‘match_busid’

---

drivers/staging/usbip/stub_main.c +1 -1
index e9085d6..fc5b829 100644
@@ -37,7 +37,7 @@ struct kmem_cache *stub_priv_cache;
 static struct bus_id_priv busid_table[MAX_BUSID];
 static spinlock_t busid_table_lock;
 
-int match_busid(const char *busid)
+static int match_busid(const char *busid)
 {
 	int i;
 
#3 lore raw

Forget it, this change is already there in the
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6.git , on staging-next branch. I just forget to switch the branch from master after cloning the staging-2.6 repository.

Regards,

Márton Németh

Quoted 22 lines · Németh Márton

From: Márton Németh <[email protected]>

The function match_busid() is only referenced in the stub_main.c so it can be changed to static. This will remove the following warning when compiling with "make W=1 ...":
* drivers/staging/usbip/stub_main.c:40: warning: no previous prototype for ‘match_busid’

---

drivers/staging/usbip/stub_main.c +1 -1
index e9085d6..fc5b829 100644
@@ -37,7 +37,7 @@ struct kmem_cache *stub_priv_cache;
 static struct bus_id_priv busid_table[MAX_BUSID];
 static spinlock_t busid_table_lock;
 
-int match_busid(const char *busid)
+static int match_busid(const char *busid)
 {
 	int i;