* 9p: a couple of cleanup patches
@ 2008-04-13 22:43 Dmitri Vorobiev
2008-04-13 22:43 ` [PATCH 1/2] 9p: four functions can become static Dmitri Vorobiev
2008-04-13 22:43 ` [PATCH 2/2] 9p: remove redundant variable initialization in net/9p/mod.c Dmitri Vorobiev
0 siblings, 2 replies; 3+ messages in thread
From: Dmitri Vorobiev @ 2008-04-13 22:43 UTC (permalink / raw)
To: ericvh, rminnich, lucho, v9fs-developer, linux-kernel
Hello,
An error spotted by sparse inspired me for a quick code review
of the 9p driver, which resulted in a couple of nitpicking
patches that follow.
The patches were build-tested both for a modularized driver
and when the latter was included into the kernel proper.
Please consider.
Thanks,
Dmitri Vorobiev
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] 9p: four functions can become static
2008-04-13 22:43 9p: a couple of cleanup patches Dmitri Vorobiev
@ 2008-04-13 22:43 ` Dmitri Vorobiev
2008-04-13 22:43 ` [PATCH 2/2] 9p: remove redundant variable initialization in net/9p/mod.c Dmitri Vorobiev
1 sibling, 0 replies; 3+ messages in thread
From: Dmitri Vorobiev @ 2008-04-13 22:43 UTC (permalink / raw)
To: ericvh, rminnich, lucho, v9fs-developer, linux-kernel
The following functions can become static:
p9_client_rpc()
p9_fd_rpc()
p9_conn_rpcnb()
p9_conn_cancel()
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
net/9p/client.c | 2 +-
net/9p/trans_fd.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/9p/client.c b/net/9p/client.c
index 84e087e..0a20095 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -117,7 +117,7 @@ static void parse_opts(char *options, struct p9_client *clnt)
* @tc: request to be sent
* @rc: pointer where a pointer to the response is stored
*/
-int
+static int
p9_client_rpc(struct p9_client *c, struct p9_fcall *tc,
struct p9_fcall **rc)
{
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index f624dff..7ec221f 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -965,7 +965,7 @@ p9_conn_rpc_cb(struct p9_req *req, void *a)
* @tc: request to be sent
* @rc: pointer where a pointer to the response is stored
*/
-int
+static int
p9_fd_rpc(struct p9_trans *t, struct p9_fcall *tc, struct p9_fcall **rc)
{
struct p9_trans_fd *p = t->priv;
@@ -1043,7 +1043,7 @@ p9_fd_rpc(struct p9_trans *t, struct p9_fcall *tc, struct p9_fcall **rc)
* @cb: callback function to be called when response arrives
* @cba: value to pass to the callback function
*/
-int p9_conn_rpcnb(struct p9_conn *m, struct p9_fcall *tc,
+static int p9_conn_rpcnb(struct p9_conn *m, struct p9_fcall *tc,
p9_conn_req_callback cb, void *a)
{
int err;
@@ -1066,7 +1066,7 @@ int p9_conn_rpcnb(struct p9_conn *m, struct p9_fcall *tc,
* @m: mux data
* @err: error code
*/
-void p9_conn_cancel(struct p9_conn *m, int err)
+static void p9_conn_cancel(struct p9_conn *m, int err)
{
struct p9_req *req, *rtmp;
LIST_HEAD(cancel_list);
--
1.5.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] 9p: remove redundant variable initialization in net/9p/mod.c
2008-04-13 22:43 9p: a couple of cleanup patches Dmitri Vorobiev
2008-04-13 22:43 ` [PATCH 1/2] 9p: four functions can become static Dmitri Vorobiev
@ 2008-04-13 22:43 ` Dmitri Vorobiev
1 sibling, 0 replies; 3+ messages in thread
From: Dmitri Vorobiev @ 2008-04-13 22:43 UTC (permalink / raw)
To: ericvh, rminnich, lucho, v9fs-developer, linux-kernel
There is no need to explicitly initialize the global variable
p9_debug_level by assigning zero value to it.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
net/9p/mod.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/9p/mod.c b/net/9p/mod.c
index c285aab..d3c5329 100644
--- a/net/9p/mod.c
+++ b/net/9p/mod.c
@@ -33,7 +33,7 @@
#include <linux/list.h>
#ifdef CONFIG_NET_9P_DEBUG
-unsigned int p9_debug_level = 0; /* feature-rific global debug level */
+unsigned int p9_debug_level; /* feature-rific global debug level */
EXPORT_SYMBOL(p9_debug_level);
module_param_named(debug, p9_debug_level, uint, 0);
MODULE_PARM_DESC(debug, "9P debugging level");
--
1.5.3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-13 22:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-13 22:43 9p: a couple of cleanup patches Dmitri Vorobiev
2008-04-13 22:43 ` [PATCH 1/2] 9p: four functions can become static Dmitri Vorobiev
2008-04-13 22:43 ` [PATCH 2/2] 9p: remove redundant variable initialization in net/9p/mod.c Dmitri Vorobiev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®