Skip to contentSkip to conversation

staging: usbip: Fix bad fuction definitions in usbip

PATCH In review Pawel Lebioda 2 participants 2 messages May 14, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: usbip: Fix bad fuction definitions in usbip

Fix bad function definitions in all files from drivers/staging/usbip directory

---
 drivers/staging/usbip/userspace/libsrc/usbip_common.c | 2 +-
 drivers/staging/usbip/userspace/libsrc/vhci_driver.c  | 2 +-
 drivers/staging/usbip/userspace/src/usbip_port.c      | 2 +-
 drivers/staging/usbip/userspace/src/usbipd.c          | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/usbip/userspace/libsrc/usbip_common.c +1 -1
index 05a7443..ac73710 100644
@@ -237,7 +237,7 @@ int usbip_names_init(char *f)
 	return names_init(f);
 }
 
-void usbip_names_free()
+void usbip_names_free(void)
 {
 	names_free();
 }
drivers/staging/usbip/userspace/libsrc/vhci_driver.c +1 -1
index 8901fcb..ad92047 100644
@@ -260,7 +260,7 @@ err:
 }
 
 
-void usbip_vhci_driver_close()
+void usbip_vhci_driver_close(void)
 {
 	if (!vhci_driver)
 		return;
drivers/staging/usbip/userspace/src/usbip_port.c +1 -1
index 52aa168..a2e884f 100644
@@ -16,7 +16,7 @@
 #include "vhci_driver.h"
 #include "usbip_common.h"
 
-static int list_imported_devices()
+static int list_imported_devices(void)
 {
 	int i;
 	struct usbip_imported_device *idev;
drivers/staging/usbip/userspace/src/usbipd.c +2 -2
index b32047a..2f87f2d 100644
@@ -458,7 +458,7 @@ static void set_signal(void)
 
 static const char *pid_file;
 
-static void write_pid_file()
+static void write_pid_file(void)
 {
 	if (pid_file) {
 		dbg("creating pid file %s", pid_file);
@@ -475,7 +475,7 @@ static void write_pid_file()
 	}
 }
 
-static void remove_pid_file()
+static void remove_pid_file(void)
 {
 	if (pid_file) {
 		dbg("removing pid file %s", pid_file);
Signature · 1 line
1.8.3.2
#1 lore raw
Quoted 3 lines · Pawel Lebioda

Fix bad function definitions in all files from drivers/staging/usbip directory

This is fine, but next time try to be more specific in the subject and also in the changelog. Put the sparse warning in the changelog. Say that you are adding "void".

Btw, the reason for the void is because if it's not void then the compiler won't complain if you pass a parameter to it.

void frob()

{
	printf("foo\n");
}

int main(void)

{
	frob(1, 2, 3);

	return 0;
}

regards,
dan carpenter