From: "Jan Beulich" Subject: Re: [PATCH v2 2/4] xen: introduce grant_map_exists Date: Mon, 06 Oct 2014 11:17:55 +0100 Message-ID: <54328873020000780003C66D@mail.emea.novell.com> References: <1412347845-27755-2-git-send-email-stefano.stabellini@eu.citrix.com> <54326D50020000780003C589@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xb5Me-0006k0-Q0 for xen-devel@lists.xenproject.org; Mon, 06 Oct 2014 10:18:00 +0000 In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: julien.grall@citrix.com, xen-devel , Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 06.10.14 at 11:41, wrote: > On Mon, 6 Oct 2014, Jan Beulich wrote: >> >>> On 03.10.14 at 16:50, wrote: >> > --- a/xen/common/grant_table.c >> > +++ b/xen/common/grant_table.c >> > @@ -484,6 +484,36 @@ static int _set_status(unsigned gt_version, >> > return _set_status_v2(domid, readonly, mapflag, shah, act, > status); >> > } >> > >> > +static bool_t grant_map_exists(struct domain *ld, >> > + struct grant_table *rgt, >> >> Please constify these if possible. > > rgt is used below as argument for 2 functions that take non-const struct > grant_table *. nr_grant_entries() could certainly be dealt with, but I guess the other is the spin_is_locked() that the current version wrongly omitted. In which case yes, this needs to be kept non-const. Jan