Commit 9210fc0a authored by Christian Schoenebeck's avatar Christian Schoenebeck Committed by Dominique Martinet

net/9p: use macro to define default msize

Use a macro to define the default value for the 'msize' option
at one place instead of using two separate integer literals.

Link: http://lkml.kernel.org/r/28bb651ae0349a7d57e8ddc92c1bd5e62924a912.1630770829.git.linux_oss@crudebyte.comSigned-off-by: default avatarChristian Schoenebeck <linux_oss@crudebyte.com>
Signed-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
parent 22bb3b79
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#define CREATE_TRACE_POINTS #define CREATE_TRACE_POINTS
#include <trace/events/9p.h> #include <trace/events/9p.h>
#define DEFAULT_MSIZE 8192
/* /*
* Client Option Parsing (code inspired by NFS code) * Client Option Parsing (code inspired by NFS code)
* - a little lazy - parse all client options * - a little lazy - parse all client options
...@@ -65,7 +67,7 @@ EXPORT_SYMBOL(p9_is_proto_dotu); ...@@ -65,7 +67,7 @@ EXPORT_SYMBOL(p9_is_proto_dotu);
int p9_show_client_options(struct seq_file *m, struct p9_client *clnt) int p9_show_client_options(struct seq_file *m, struct p9_client *clnt)
{ {
if (clnt->msize != 8192) if (clnt->msize != DEFAULT_MSIZE)
seq_printf(m, ",msize=%u", clnt->msize); seq_printf(m, ",msize=%u", clnt->msize);
seq_printf(m, ",trans=%s", clnt->trans_mod->name); seq_printf(m, ",trans=%s", clnt->trans_mod->name);
...@@ -139,7 +141,7 @@ static int parse_opts(char *opts, struct p9_client *clnt) ...@@ -139,7 +141,7 @@ static int parse_opts(char *opts, struct p9_client *clnt)
int ret = 0; int ret = 0;
clnt->proto_version = p9_proto_2000L; clnt->proto_version = p9_proto_2000L;
clnt->msize = 8192; clnt->msize = DEFAULT_MSIZE;
if (!opts) if (!opts)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment