Merge tag 'mmc-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
[cascardo/linux.git] / include / linux / sunrpc / xdr.h
index 70c6b92..56c48c8 100644 (file)
@@ -67,6 +67,18 @@ struct xdr_buf {
                        len;            /* Length of XDR encoded message */
 };
 
+static inline void
+xdr_buf_init(struct xdr_buf *buf, void *start, size_t len)
+{
+       buf->head[0].iov_base = start;
+       buf->head[0].iov_len = len;
+       buf->tail[0].iov_len = 0;
+       buf->page_len = 0;
+       buf->flags = 0;
+       buf->len = 0;
+       buf->buflen = len;
+}
+
 /*
  * pre-xdr'ed macros.
  */