From: Joe Perches <joe@perches.com>
To: sunwxg <sun.wxg@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andreas Dilger <andreas.dilger@intel.com>,
Amir Shehata <amir.shehata@intel.com>,
Peng Tao <bergwolf@gmail.com>,
Doug Oucharek <doug.s.oucharek@intel.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging:lustre:lnet: Incorrect type in assignment
Date: Sun, 30 Nov 2014 22:33:14 -0800 [thread overview]
Message-ID: <1417415594.4894.1.camel@perches.com> (raw)
In-Reply-To: <1417414684-9726-2-git-send-email-sun.wxg@gmail.com>
On Mon, 2014-12-01 at 14:18 +0800, sunwxg wrote:
> Incorrect type when assign value to varible iov_base.
[]
> diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c
[]
> @@ -256,7 +256,8 @@ lnet_extract_iov(int dst_niov, struct iovec *dst,
> LASSERT((int)niov <= dst_niov);
>
> frag_len = src->iov_len - offset;
> - dst->iov_base = ((char *)src->iov_base) + offset;
> + dst->iov_base = (void __user *)
> + (((char *)src->iov_base) + offset);
Just use void * arithmetic and remove the cast
dst->iov_base = src->iov_base + offset;
next prev parent reply other threads:[~2014-12-01 6:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 6:18 [PATCH] staging:lustre:lnet: Incorrect type in assignment sunwxg
2014-12-01 6:33 ` Joe Perches [this message]
[not found] <1417416832-10352-1-git-send-email-sun.wxg@gmail.com>
2014-12-01 6:53 ` sunwxg
2014-12-02 17:15 ` Al Viro
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=1417415594.4894.1.camel@perches.com \
--to=joe@perches.com \
--cc=amir.shehata@intel.com \
--cc=andreas.dilger@intel.com \
--cc=bergwolf@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=doug.s.oucharek@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sun.wxg@gmail.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