All of lore.kernel.org
 help / color / mirror / Atom feed
From: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: v9fs-developer@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [V9fs-developer] [PATCH 5/5] 9p: Fix sparse error
Date: Fri, 25 Mar 2011 14:26:53 -0700	[thread overview]
Message-ID: <4D8D089D.8020207@linux.vnet.ibm.com> (raw)
In-Reply-To: <1301052651-21440-5-git-send-email-aneesh.kumar@linux.vnet.ibm.com>

On 03/25/2011 04:30 AM, Aneesh Kumar K.V wrote:
> Signed-off-by: Aneesh Kumar K.V<aneesh.kumar@linux.vnet.ibm.com>
Reviewed-by : Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
> ---
>   net/9p/protocol.c     |    3 ++-
>   net/9p/trans_common.c |    2 +-
>   net/9p/trans_virtio.c |   15 +++++++++++----
>   3 files changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/net/9p/protocol.c b/net/9p/protocol.c
> index 8a4084f..a7e8997 100644
> --- a/net/9p/protocol.c
> +++ b/net/9p/protocol.c
> @@ -468,7 +468,8 @@ p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt,
>   		case 'E':{
>   				 int32_t cnt = va_arg(ap, int32_t);
>   				 const char *k = va_arg(ap, const void *);
> -				 const char *u = va_arg(ap, const void *);
> +				 const char __user *u = va_arg(ap,
> +							const void __user *);
>   				 errcode = p9pdu_writef(pdu, proto_version, "d",
>   						 cnt);
>   				 if (!errcode&&  pdu_write_urw(pdu, k, u, cnt))
> diff --git a/net/9p/trans_common.c b/net/9p/trans_common.c
> index 9172ab7..14265e8 100644
> --- a/net/9p/trans_common.c
> +++ b/net/9p/trans_common.c
> @@ -66,7 +66,7 @@ p9_payload_gup(struct p9_req_t *req, size_t *pdata_off, int *pdata_len,
>   	uint32_t pdata_mapped_pages;
>   	struct trans_rpage_info  *rpinfo;
>
> -	*pdata_off = (size_t)req->tc->pubuf&  (PAGE_SIZE-1);
> +	*pdata_off = (__force size_t)req->tc->pubuf&  (PAGE_SIZE-1);
>
>   	if (*pdata_off)
>   		first_page_bytes = min(((size_t)PAGE_SIZE - *pdata_off),
> diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
> index e8f046b..244e707 100644
> --- a/net/9p/trans_virtio.c
> +++ b/net/9p/trans_virtio.c
> @@ -326,8 +326,11 @@ req_retry_pinned:
>   			outp = pack_sg_list_p(chan->sg, out, VIRTQUEUE_NUM,
>   					pdata_off, rpinfo->rp_data, pdata_len);
>   		} else {
> -			char *pbuf = req->tc->pubuf ? req->tc->pubuf :
> -								req->tc->pkbuf;
> +			char *pbuf;
> +			if (req->tc->pubuf)
> +				pbuf = (__force char *) req->tc->pubuf;
> +			else
> +				pbuf = req->tc->pkbuf;
>   			outp = pack_sg_list(chan->sg, out, VIRTQUEUE_NUM, pbuf,
>   					req->tc->pbuf_size);
>   		}
> @@ -352,8 +355,12 @@ req_retry_pinned:
>   			in = pack_sg_list_p(chan->sg, out+inp, VIRTQUEUE_NUM,
>   					pdata_off, rpinfo->rp_data, pdata_len);
>   		} else {
> -			char *pbuf = req->tc->pubuf ? req->tc->pubuf :
> -								req->tc->pkbuf;
> +			char *pbuf;
> +			if (req->tc->pubuf)
> +				pbuf = (__force char *) req->tc->pubuf;
> +			else
> +				pbuf = req->tc->pkbuf;
> +
>   			in = pack_sg_list(chan->sg, out+inp, VIRTQUEUE_NUM,
>   					pbuf, req->tc->pbuf_size);
>   		}


  reply	other threads:[~2011-03-25 21:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 11:30 [PATCH 1/5] fs/9p: Fix revalidate to return correct value Aneesh Kumar K.V
2011-03-25 11:30 ` [PATCH 2/5] fs/9p: Use write_inode for data sync on server Aneesh Kumar K.V
2011-03-25 20:49   ` [V9fs-developer] " Venkateswararao Jujjuri
2011-03-25 11:30 ` [PATCH 3/5] 9p: revert tsyncfs related changes Aneesh Kumar K.V
2011-03-25 21:20   ` [V9fs-developer] " Venkateswararao Jujjuri
2011-03-27  8:28     ` Aneesh Kumar K. V
2011-03-27 22:24       ` Venkateswararao Jujjuri
2011-03-29 16:05         ` Eric Van Hensbergen
2011-04-15 17:30           ` Aneesh Kumar K.V
2011-03-25 11:30 ` [PATCH 4/5] fs/9p: Fix error reported by coccicheck Aneesh Kumar K.V
2011-03-25 21:27   ` [V9fs-developer] " Venkateswararao Jujjuri
2011-03-25 11:30 ` [PATCH 5/5] 9p: Fix sparse error Aneesh Kumar K.V
2011-03-25 21:26   ` Venkateswararao Jujjuri [this message]
2011-03-25 20:50 ` [V9fs-developer] [PATCH 1/5] fs/9p: Fix revalidate to return correct value Venkateswararao Jujjuri
2011-03-28 20:49   ` Venkateswararao Jujjuri
2011-03-29  4:38     ` Aneesh Kumar K. V

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=4D8D089D.8020207@linux.vnet.ibm.com \
    --to=jvrao@linux.vnet.ibm.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.