]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/9p/conv.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / fs / 9p / conv.c
index 55ccfa10ee9eeed3cf65f3efd855468b9125b88e..bf1f10067960be8feb075d8740229d1419993b53 100644 (file)
@@ -56,7 +56,7 @@ static inline int buf_check_overflow(struct cbuf *buf)
        return buf->p > buf->ep;
 }
 
-static inline int buf_check_size(struct cbuf *buf, int len)
+static int buf_check_size(struct cbuf *buf, int len)
 {
        if (buf->p + len > buf->ep) {
                if (buf->p < buf->ep) {
@@ -72,7 +72,7 @@ static inline int buf_check_size(struct cbuf *buf, int len)
        return 1;
 }
 
-static inline void *buf_alloc(struct cbuf *buf, int len)
+static void *buf_alloc(struct cbuf *buf, int len)
 {
        void *ret = NULL;
 
@@ -84,7 +84,7 @@ static inline void *buf_alloc(struct cbuf *buf, int len)
        return ret;
 }
 
-static inline void buf_put_int8(struct cbuf *buf, u8 val)
+static void buf_put_int8(struct cbuf *buf, u8 val)
 {
        if (buf_check_size(buf, 1)) {
                buf->p[0] = val;
@@ -92,7 +92,7 @@ static inline void buf_put_int8(struct cbuf *buf, u8 val)
        }
 }
 
-static inline void buf_put_int16(struct cbuf *buf, u16 val)
+static void buf_put_int16(struct cbuf *buf, u16 val)
 {
        if (buf_check_size(buf, 2)) {
                *(__le16 *) buf->p = cpu_to_le16(val);
@@ -100,7 +100,7 @@ static inline void buf_put_int16(struct cbuf *buf, u16 val)
        }
 }
 
-static inline void buf_put_int32(struct cbuf *buf, u32 val)
+static void buf_put_int32(struct cbuf *buf, u32 val)
 {
        if (buf_check_size(buf, 4)) {
                *(__le32 *)buf->p = cpu_to_le32(val);
@@ -108,7 +108,7 @@ static inline void buf_put_int32(struct cbuf *buf, u32 val)
        }
 }
 
-static inline void buf_put_int64(struct cbuf *buf, u64 val)
+static void buf_put_int64(struct cbuf *buf, u64 val)
 {
        if (buf_check_size(buf, 8)) {
                *(__le64 *)buf->p = cpu_to_le64(val);
@@ -116,13 +116,19 @@ static inline void buf_put_int64(struct cbuf *buf, u64 val)
        }
 }
 
-static inline void buf_put_stringn(struct cbuf *buf, const char *s, u16 slen)
+static char *buf_put_stringn(struct cbuf *buf, const char *s, u16 slen)
 {
+       char *ret;
+
+       ret = NULL;
        if (buf_check_size(buf, slen + 2)) {
                buf_put_int16(buf, slen);
+               ret = buf->p;
                memcpy(buf->p, s, slen);
                buf->p += slen;
        }
+
+       return ret;
 }
 
 static inline void buf_put_string(struct cbuf *buf, const char *s)
@@ -130,7 +136,7 @@ static inline void buf_put_string(struct cbuf *buf, const char *s)
        buf_put_stringn(buf, s, strlen(s));
 }
 
-static inline u8 buf_get_int8(struct cbuf *buf)
+static u8 buf_get_int8(struct cbuf *buf)
 {
        u8 ret = 0;
 
@@ -142,7 +148,7 @@ static inline u8 buf_get_int8(struct cbuf *buf)
        return ret;
 }
 
-static inline u16 buf_get_int16(struct cbuf *buf)
+static u16 buf_get_int16(struct cbuf *buf)
 {
        u16 ret = 0;
 
@@ -154,7 +160,7 @@ static inline u16 buf_get_int16(struct cbuf *buf)
        return ret;
 }
 
-static inline u32 buf_get_int32(struct cbuf *buf)
+static u32 buf_get_int32(struct cbuf *buf)
 {
        u32 ret = 0;
 
@@ -166,7 +172,7 @@ static inline u32 buf_get_int32(struct cbuf *buf)
        return ret;
 }
 
-static inline u64 buf_get_int64(struct cbuf *buf)
+static u64 buf_get_int64(struct cbuf *buf)
 {
        u64 ret = 0;
 
@@ -178,7 +184,7 @@ static inline u64 buf_get_int64(struct cbuf *buf)
        return ret;
 }
 
-static inline void buf_get_str(struct cbuf *buf, struct v9fs_str *vstr)
+static void buf_get_str(struct cbuf *buf, struct v9fs_str *vstr)
 {
        vstr->len = buf_get_int16(buf);
        if (!buf_check_overflow(buf) && buf_check_size(buf, vstr->len)) {
@@ -190,7 +196,7 @@ static inline void buf_get_str(struct cbuf *buf, struct v9fs_str *vstr)
        }
 }
 
-static inline void buf_get_qid(struct cbuf *bufp, struct v9fs_qid *qid)
+static void buf_get_qid(struct cbuf *bufp, struct v9fs_qid *qid)
 {
        qid->type = buf_get_int8(bufp);
        qid->version = buf_get_int32(bufp);
@@ -254,7 +260,7 @@ static int v9fs_size_wstat(struct v9fs_wstat *wstat, int extended)
  *
  */
 
-static inline void
+static void
 buf_get_stat(struct cbuf *bufp, struct v9fs_stat *stat, int extended)
 {
        stat->size = buf_get_int16(bufp);
@@ -427,21 +433,25 @@ static inline void v9fs_put_int64(struct cbuf *bufp, u64 val, u64 * p)
        buf_put_int64(bufp, val);
 }
 
-static inline void
+static void
 v9fs_put_str(struct cbuf *bufp, char *data, struct v9fs_str *str)
 {
-       if (data) {
-               str->len = strlen(data);
-               str->str = bufp->p;
-       } else {
-               str->len = 0;
-               str->str = NULL;
-       }
+       int len;
+       char *s;
 
-       buf_put_stringn(bufp, data, str->len);
+       if (data)
+               len = strlen(data);
+       else
+               len = 0;
+
+       s = buf_put_stringn(bufp, data, len);
+       if (str) {
+               str->len = len;
+               str->str = s;
+       }
 }
 
-static inline int
+static int
 v9fs_put_user_data(struct cbuf *bufp, const char __user * data, int count,
                   unsigned char **pdata)
 {