public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: xfs@oss.sgi.com
Subject: [PATCH] use struct kvec in struct uio
Date: Wed, 29 Nov 2006 16:46:07 +0100	[thread overview]
Message-ID: <20061129154607.GB6400@lst.de> (raw)

All but one useage of struct uio are for kernel pointers, so let's use
struct kvec instead of struct iovec.  Because readlink by handle still
uses it with a user pointer we still have two sparse warnings, but the
noise level is reduced quite a bit by this.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/fs/xfs/support/move.h
===================================================================
--- linux-2.6.orig/fs/xfs/support/move.h	2006-11-29 16:27:25.000000000 +0100
+++ linux-2.6/fs/xfs/support/move.h	2006-11-29 16:30:18.000000000 +0100
@@ -55,7 +55,7 @@
 };
 
 struct uio {
-	struct iovec	*uio_iov;   /* pointer to array of iovecs */
+	struct kvec	*uio_iov;   /* pointer to array of iovecs */
 	int		uio_iovcnt; /* number of iovecs in array */
 	xfs_off_t	uio_offset; /* offset in file this uio corresponds to */
 	int		uio_resid;  /* residual i/o count */
@@ -63,7 +63,7 @@
 };
 
 typedef struct uio uio_t;
-typedef struct iovec iovec_t;
+typedef struct kvec iovec_t;
 
 extern int	xfs_uio_read (caddr_t, size_t, uio_t *);
 
Index: linux-2.6/fs/xfs/linux-2.6/xfs_ioctl.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_ioctl.c	2006-11-29 16:33:37.000000000 +0100
+++ linux-2.6/fs/xfs/linux-2.6/xfs_ioctl.c	2006-11-29 16:34:43.000000000 +0100
@@ -388,7 +388,7 @@
 	aiov.iov_len	= olen;
 	aiov.iov_base	= hreq.ohandle;
 
-	auio.uio_iov	= &aiov;
+	auio.uio_iov	= (struct kvec *)&aiov;
 	auio.uio_iovcnt	= 1;
 	auio.uio_offset	= 0;
 	auio.uio_segflg	= UIO_USERSPACE;

             reply	other threads:[~2006-11-29 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 15:46 Christoph Hellwig [this message]
2007-02-07 12:54 ` [PATCH] use struct kvec in struct uio Christoph Hellwig
2007-02-07 18:02   ` Lachlan McIlroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061129154607.GB6400@lst.de \
    --to=hch@lst.de \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox