Skip to content

Commit 9210fc0

Browse files
cschoenebeckmartinetd
authored andcommitted
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.com Signed-off-by: Christian Schoenebeck <[email protected]> Signed-off-by: Dominique Martinet <[email protected]>
1 parent 22bb3b7 commit 9210fc0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

net/9p/client.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#define CREATE_TRACE_POINTS
3131
#include <trace/events/9p.h>
3232

33+
#define DEFAULT_MSIZE 8192
34+
3335
/*
3436
* Client Option Parsing (code inspired by NFS code)
3537
* - a little lazy - parse all client options
@@ -65,7 +67,7 @@ EXPORT_SYMBOL(p9_is_proto_dotu);
6567

6668
int p9_show_client_options(struct seq_file *m, struct p9_client *clnt)
6769
{
68-
if (clnt->msize != 8192)
70+
if (clnt->msize != DEFAULT_MSIZE)
6971
seq_printf(m, ",msize=%u", clnt->msize);
7072
seq_printf(m, ",trans=%s", clnt->trans_mod->name);
7173

@@ -139,7 +141,7 @@ static int parse_opts(char *opts, struct p9_client *clnt)
139141
int ret = 0;
140142

141143
clnt->proto_version = p9_proto_2000L;
142-
clnt->msize = 8192;
144+
clnt->msize = DEFAULT_MSIZE;
143145

144146
if (!opts)
145147
return 0;

0 commit comments

Comments
 (0)