lkml.org 
[lkml]   [2018]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] net:9p: change the p9_error_init and p9_trans_fd_init to be void function
Date
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@huawei.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
\
 
 \ /
  Last update: 2018-08-08 16:15    [W:0.044 / U:8.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site