Netdev List
 help / color / mirror / Atom feed
From: zhong jiang <zhongjiang@huawei.com>
To: <ericvh@gmail.com>, <rminnich@sandia.gov>, <lucho@ionkov.net>,
	<davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] net:9p: change the p9_error_init and p9_trans_fd_init to be void function
Date: Wed, 8 Aug 2018 22:02:48 +0800	[thread overview]
Message-ID: <1533736968-9365-1-git-send-email-zhongjiang@huawei.com> (raw)

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

                 reply	other threads:[~2018-08-08 14:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533736968-9365-1-git-send-email-zhongjiang@huawei.com \
    --to=zhongjiang@huawei.com \
    --cc=davem@davemloft.net \
    --cc=ericvh@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucho@ionkov.net \
    --cc=netdev@vger.kernel.org \
    --cc=rminnich@sandia.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox