aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/conv.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-01-17 22:49:59 -0500
committerSteve French <sfrench@us.ibm.com>2006-01-17 22:49:59 -0500
commitd65177c1ae7f085723154105c5dc8d9e16ae8265 (patch)
tree14408129d880d89cc5e937f2810f243ed1e6fcde /fs/9p/conv.c
parentd41f084a74de860fe879403fbbad13abdf7aea8e (diff)
parent15578eeb6cd4b74492f26e60624aa1a9a52ddd7b (diff)
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/9p/conv.c')
-rw-r--r--fs/9p/conv.c32
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
59static inline int buf_check_size(struct cbuf *buf, int len) 59static 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
75static inline void *buf_alloc(struct cbuf *buf, int len) 75static 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
87static inline void buf_put_int8(struct cbuf *buf, u8 val) 87static 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
95static inline void buf_put_int16(struct cbuf *buf, u16 val) 95static 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
103static inline void buf_put_int32(struct cbuf *buf, u32 val) 103static 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
111static inline void buf_put_int64(struct cbuf *buf, u64 val) 111static 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
119static inline void buf_put_stringn(struct cbuf *buf, const char *s, u16 slen) 119static 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
133static inline u8 buf_get_int8(struct cbuf *buf) 133static 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
145static inline u16 buf_get_int16(struct cbuf *buf) 145static 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
157static inline u32 buf_get_int32(struct cbuf *buf) 157static 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
169static inline u64 buf_get_int64(struct cbuf *buf) 169static 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
181static inline void buf_get_str(struct cbuf *buf, struct v9fs_str *vstr) 181static 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
193static inline void buf_get_qid(struct cbuf *bufp, struct v9fs_qid *qid) 193static 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
257static inline void 257static void
258buf_get_stat(struct cbuf *bufp, struct v9fs_stat *stat, int extended) 258buf_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
430static inline void 430static void
431v9fs_put_str(struct cbuf *bufp, char *data, struct v9fs_str *str) 431v9fs_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
444static inline int 444static int
445v9fs_put_user_data(struct cbuf *bufp, const char __user * data, int count, 445v9fs_put_user_data(struct cbuf *bufp, const char __user * data, int count,
446 unsigned char **pdata) 446 unsigned char **pdata)
447{ 447{