linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: usbip: Fix bad fuction definitions in usbip
@ 2014-05-14 19:28 Pawel Lebioda
  2014-05-14 19:35 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Pawel Lebioda @ 2014-05-14 19:28 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel

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

Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>
---
 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(-)

diff --git a/drivers/staging/usbip/userspace/libsrc/usbip_common.c b/drivers/staging/usbip/userspace/libsrc/usbip_common.c
index 05a7443..ac73710 100644
--- a/drivers/staging/usbip/userspace/libsrc/usbip_common.c
+++ b/drivers/staging/usbip/userspace/libsrc/usbip_common.c
@@ -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();
 }
diff --git a/drivers/staging/usbip/userspace/libsrc/vhci_driver.c b/drivers/staging/usbip/userspace/libsrc/vhci_driver.c
index 8901fcb..ad92047 100644
--- a/drivers/staging/usbip/userspace/libsrc/vhci_driver.c
+++ b/drivers/staging/usbip/userspace/libsrc/vhci_driver.c
@@ -260,7 +260,7 @@ err:
 }
 
 
-void usbip_vhci_driver_close()
+void usbip_vhci_driver_close(void)
 {
 	if (!vhci_driver)
 		return;
diff --git a/drivers/staging/usbip/userspace/src/usbip_port.c b/drivers/staging/usbip/userspace/src/usbip_port.c
index 52aa168..a2e884f 100644
--- a/drivers/staging/usbip/userspace/src/usbip_port.c
+++ b/drivers/staging/usbip/userspace/src/usbip_port.c
@@ -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;
diff --git a/drivers/staging/usbip/userspace/src/usbipd.c b/drivers/staging/usbip/userspace/src/usbipd.c
index b32047a..2f87f2d 100644
--- a/drivers/staging/usbip/userspace/src/usbipd.c
+++ b/drivers/staging/usbip/userspace/src/usbipd.c
@@ -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);
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: usbip: Fix bad fuction definitions in usbip
  2014-05-14 19:28 [PATCH] staging: usbip: Fix bad fuction definitions in usbip Pawel Lebioda
@ 2014-05-14 19:35 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2014-05-14 19:35 UTC (permalink / raw)
  To: Pawel Lebioda; +Cc: gregkh, devel, linux-kernel

On Wed, May 14, 2014 at 09:28:27PM +0200, Pawel Lebioda wrote:
> Fix bad function definitions in all files from drivers/staging/usbip directory
> 
> Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-14 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-14 19:28 [PATCH] staging: usbip: Fix bad fuction definitions in usbip Pawel Lebioda
2014-05-14 19:35 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).