lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 8 Aug 2018 22:02:48 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     <ericvh@...il.com>, <rminnich@...dia.gov>, <lucho@...kov.net>,
        <davem@...emloft.net>
CC:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] net:9p: change the p9_error_init and p9_trans_fd_init to be void function

The two functions has return value, but any of the callees do not handle the
return value. So we get out of the return value and make the function to be
void function. 

Signed-off-by: zhong jiang <zhongjiang@...wei.com>
---
 include/net/9p/9p.h | 4 ++--
 net/9p/error.c      | 4 +---
 net/9p/trans_fd.c   | 4 +---
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index b8eb51a..0a9577d 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -571,7 +571,7 @@ struct p9_fcall {
 void p9_idpool_put(int id, struct p9_idpool *p);
 int p9_idpool_check(int id, struct p9_idpool *p);
 
-int p9_error_init(void);
-int p9_trans_fd_init(void);
+void p9_error_init(void);
+void p9_trans_fd_init(void);
 void p9_trans_fd_exit(void);
 #endif /* NET_9P_H */
diff --git a/net/9p/error.c b/net/9p/error.c
index 126fd0d..458e038 100644
--- a/net/9p/error.c
+++ b/net/9p/error.c
@@ -190,7 +190,7 @@ struct errormap {
  *
  */
 
-int p9_error_init(void)
+void p9_error_init(void)
 {
 	struct errormap *c;
 	int bucket;
@@ -206,8 +206,6 @@ int p9_error_init(void)
 		INIT_HLIST_NODE(&c->list);
 		hlist_add_head(&c->list, &hash_errmap[bucket]);
 	}
-
-	return 1;
 }
 EXPORT_SYMBOL(p9_error_init);
 
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index e2ef3c7..e0f36c9 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -1121,13 +1121,11 @@ static void p9_poll_workfn(struct work_struct *work)
 	p9_debug(P9_DEBUG_TRANS, "finish\n");
 }
 
-int p9_trans_fd_init(void)
+void p9_trans_fd_init(void)
 {
 	v9fs_register_trans(&p9_tcp_trans);
 	v9fs_register_trans(&p9_unix_trans);
 	v9fs_register_trans(&p9_fd_trans);
-
-	return 0;
 }
 
 void p9_trans_fd_exit(void)
-- 
1.7.12.4

Powered by blists - more mailing lists