diff options
Diffstat (limited to 'fs/9p/conv.c')
-rw-r--r-- | fs/9p/conv.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/9p/conv.c b/fs/9p/conv.c index 55ccfa10ee9e..32a9f99154e2 100644 --- a/fs/9p/conv.c +++ b/fs/9p/conv.c | |||
@@ -56,7 +56,7 @@ static inline int buf_check_overflow(struct cbuf *buf) | |||
56 | return buf->p > buf->ep; | 56 | return buf->p > buf->ep; |
57 | } | 57 | } |
58 | 58 | ||
59 | static inline int buf_check_size(struct cbuf *buf, int len) | 59 | static int buf_check_size(struct cbuf *buf, int len) |
60 | { | 60 | { |
61 | if (buf->p + len > buf->ep) { | 61 | if (buf->p + len > buf->ep) { |
62 | if (buf->p < buf->ep) { | 62 | if (buf->p < buf->ep) { |
@@ -72,7 +72,7 @@ static inline int buf_check_size(struct cbuf *buf, int len) | |||
72 | return 1; | 72 | return 1; |
73 | } | 73 | } |
74 | 74 | ||
75 | static inline void *buf_alloc(struct cbuf *buf, int len) | 75 | static void *buf_alloc(struct cbuf *buf, int len) |
76 | { | 76 | { |
77 | void *ret = NULL; | 77 | void *ret = NULL; |
78 | 78 | ||
@@ -84,7 +84,7 @@ static inline void *buf_alloc(struct cbuf *buf, int len) | |||
84 | return ret; | 84 | return ret; |
85 | } | 85 | } |
86 | 86 | ||
87 | static inline void buf_put_int8(struct cbuf *buf, u8 val) | 87 | static void buf_put_int8(struct cbuf *buf, u8 val) |
88 | { | 88 | { |
89 | if (buf_check_size(buf, 1)) { | 89 | if (buf_check_size(buf, 1)) { |
90 | buf->p[0] = val; | 90 | buf->p[0] = val; |
@@ -92,7 +92,7 @@ static inline void buf_put_int8(struct cbuf *buf, u8 val) | |||
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
95 | static inline void buf_put_int16(struct cbuf *buf, u16 val) | 95 | static void buf_put_int16(struct cbuf *buf, u16 val) |
96 | { | 96 | { |
97 | if (buf_check_size(buf, 2)) { | 97 | if (buf_check_size(buf, 2)) { |
98 | *(__le16 *) buf->p = cpu_to_le16(val); | 98 | *(__le16 *) buf->p = cpu_to_le16(val); |
@@ -100,7 +100,7 @@ static inline void buf_put_int16(struct cbuf *buf, u16 val) | |||
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
103 | static inline void buf_put_int32(struct cbuf *buf, u32 val) | 103 | static void buf_put_int32(struct cbuf *buf, u32 val) |
104 | { | 104 | { |
105 | if (buf_check_size(buf, 4)) { | 105 | if (buf_check_size(buf, 4)) { |
106 | *(__le32 *)buf->p = cpu_to_le32(val); | 106 | *(__le32 *)buf->p = cpu_to_le32(val); |
@@ -108,7 +108,7 @@ static inline void buf_put_int32(struct cbuf *buf, u32 val) | |||
108 | } | 108 | } |
109 | } | 109 | } |
110 | 110 | ||
111 | static inline void buf_put_int64(struct cbuf *buf, u64 val) | 111 | static void buf_put_int64(struct cbuf *buf, u64 val) |
112 | { | 112 | { |
113 | if (buf_check_size(buf, 8)) { | 113 | if (buf_check_size(buf, 8)) { |
114 | *(__le64 *)buf->p = cpu_to_le64(val); | 114 | *(__le64 *)buf->p = cpu_to_le64(val); |
@@ -116,7 +116,7 @@ static inline void buf_put_int64(struct cbuf *buf, u64 val) | |||
116 | } | 116 | } |
117 | } | 117 | } |
118 | 118 | ||
119 | static inline void buf_put_stringn(struct cbuf *buf, const char *s, u16 slen) | 119 | static void buf_put_stringn(struct cbuf *buf, const char *s, u16 slen) |
120 | { | 120 | { |
121 | if (buf_check_size(buf, slen + 2)) { | 121 | if (buf_check_size(buf, slen + 2)) { |
122 | buf_put_int16(buf, slen); | 122 | buf_put_int16(buf, slen); |
@@ -130,7 +130,7 @@ static inline void buf_put_string(struct cbuf *buf, const char *s) | |||
130 | buf_put_stringn(buf, s, strlen(s)); | 130 | buf_put_stringn(buf, s, strlen(s)); |
131 | } | 131 | } |
132 | 132 | ||
133 | static inline u8 buf_get_int8(struct cbuf *buf) | 133 | static u8 buf_get_int8(struct cbuf *buf) |
134 | { | 134 | { |
135 | u8 ret = 0; | 135 | u8 ret = 0; |
136 | 136 | ||
@@ -142,7 +142,7 @@ static inline u8 buf_get_int8(struct cbuf *buf) | |||
142 | return ret; | 142 | return ret; |
143 | } | 143 | } |
144 | 144 | ||
145 | static inline u16 buf_get_int16(struct cbuf *buf) | 145 | static u16 buf_get_int16(struct cbuf *buf) |
146 | { | 146 | { |
147 | u16 ret = 0; | 147 | u16 ret = 0; |
148 | 148 | ||
@@ -154,7 +154,7 @@ static inline u16 buf_get_int16(struct cbuf *buf) | |||
154 | return ret; | 154 | return ret; |
155 | } | 155 | } |
156 | 156 | ||
157 | static inline u32 buf_get_int32(struct cbuf *buf) | 157 | static u32 buf_get_int32(struct cbuf *buf) |
158 | { | 158 | { |
159 | u32 ret = 0; | 159 | u32 ret = 0; |
160 | 160 | ||
@@ -166,7 +166,7 @@ static inline u32 buf_get_int32(struct cbuf *buf) | |||
166 | return ret; | 166 | return ret; |
167 | } | 167 | } |
168 | 168 | ||
169 | static inline u64 buf_get_int64(struct cbuf *buf) | 169 | static u64 buf_get_int64(struct cbuf *buf) |
170 | { | 170 | { |
171 | u64 ret = 0; | 171 | u64 ret = 0; |
172 | 172 | ||
@@ -178,7 +178,7 @@ static inline u64 buf_get_int64(struct cbuf *buf) | |||
178 | return ret; | 178 | return ret; |
179 | } | 179 | } |
180 | 180 | ||
181 | static inline void buf_get_str(struct cbuf *buf, struct v9fs_str *vstr) | 181 | static void buf_get_str(struct cbuf *buf, struct v9fs_str *vstr) |
182 | { | 182 | { |
183 | vstr->len = buf_get_int16(buf); | 183 | vstr->len = buf_get_int16(buf); |
184 | if (!buf_check_overflow(buf) && buf_check_size(buf, vstr->len)) { | 184 | if (!buf_check_overflow(buf) && buf_check_size(buf, vstr->len)) { |
@@ -190,7 +190,7 @@ static inline void buf_get_str(struct cbuf *buf, struct v9fs_str *vstr) | |||
190 | } | 190 | } |
191 | } | 191 | } |
192 | 192 | ||
193 | static inline void buf_get_qid(struct cbuf *bufp, struct v9fs_qid *qid) | 193 | static void buf_get_qid(struct cbuf *bufp, struct v9fs_qid *qid) |
194 | { | 194 | { |
195 | qid->type = buf_get_int8(bufp); | 195 | qid->type = buf_get_int8(bufp); |
196 | qid->version = buf_get_int32(bufp); | 196 | qid->version = buf_get_int32(bufp); |
@@ -254,7 +254,7 @@ static int v9fs_size_wstat(struct v9fs_wstat *wstat, int extended) | |||
254 | * | 254 | * |
255 | */ | 255 | */ |
256 | 256 | ||
257 | static inline void | 257 | static void |
258 | buf_get_stat(struct cbuf *bufp, struct v9fs_stat *stat, int extended) | 258 | buf_get_stat(struct cbuf *bufp, struct v9fs_stat *stat, int extended) |
259 | { | 259 | { |
260 | stat->size = buf_get_int16(bufp); | 260 | stat->size = buf_get_int16(bufp); |
@@ -427,7 +427,7 @@ static inline void v9fs_put_int64(struct cbuf *bufp, u64 val, u64 * p) | |||
427 | buf_put_int64(bufp, val); | 427 | buf_put_int64(bufp, val); |
428 | } | 428 | } |
429 | 429 | ||
430 | static inline void | 430 | static void |
431 | v9fs_put_str(struct cbuf *bufp, char *data, struct v9fs_str *str) | 431 | v9fs_put_str(struct cbuf *bufp, char *data, struct v9fs_str *str) |
432 | { | 432 | { |
433 | if (data) { | 433 | if (data) { |
@@ -441,7 +441,7 @@ v9fs_put_str(struct cbuf *bufp, char *data, struct v9fs_str *str) | |||
441 | buf_put_stringn(bufp, data, str->len); | 441 | buf_put_stringn(bufp, data, str->len); |
442 | } | 442 | } |
443 | 443 | ||
444 | static inline int | 444 | static int |
445 | v9fs_put_user_data(struct cbuf *bufp, const char __user * data, int count, | 445 | v9fs_put_user_data(struct cbuf *bufp, const char __user * data, int count, |
446 | unsigned char **pdata) | 446 | unsigned char **pdata) |
447 | { | 447 | { |