From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Juergen Gross <jgross@suse.com>, <linux-kernel@vger.kernel.org>,
<xen-devel@lists.xenproject.org>
Cc: <boris.ostrovsky@oracle.com>
Subject: Re: [Xen-devel] [PATCH v2] xen: add new hypercall buffer mapping device
Date: Mon, 18 Jun 2018 16:18:22 +0800 [thread overview]
Message-ID: <96e1494b-46c0-1179-ab70-00fc6ffea1e6@citrix.com> (raw)
In-Reply-To: <20180618073639.26066-1-jgross@suse.com>
On 18/06/18 15:36, Juergen Gross wrote:
> +static int privcmd_buf_mmap(struct file *file, struct vm_area_struct *vma)
> +{
> + struct privcmd_buf_private *file_priv = file->private_data;
> + struct privcmd_buf_vma_private *vma_priv;
> + unsigned long count = vma_pages(vma);
> + unsigned int i;
> + int ret = 0;
> +
> + if (!(vma->vm_flags & VM_SHARED) || count > (unsigned long)limit ||
You don't need the unsigned long cast, as limit will be promoted
automatically.
Otherwise, LGTM.
~Andrew
next prev parent reply other threads:[~2018-06-18 10:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 7:36 [PATCH v2] xen: add new hypercall buffer mapping device Juergen Gross
2018-06-18 8:18 ` Andrew Cooper [this message]
2018-06-18 15:27 ` Boris Ostrovsky
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=96e1494b-46c0-1179-ab70-00fc6ffea1e6@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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;
as well as URLs for NNTP newsgroup(s).