From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v3 1/7] vTPM: event channel bind interdomain with para/hvm virtual machine Date: Thu, 19 Mar 2015 12:59:40 +0000 Message-ID: <1426769980.610.66.camel@citrix.com> References: <1425989642-2758-1-git-send-email-quan.xu@intel.com> <1425989642-2758-2-git-send-email-quan.xu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1425989642-2758-2-git-send-email-quan.xu@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Quan Xu Cc: wei.liu2@citrix.com, keir@xen.org, stefano.stabellini@eu.citrix.com, tim@xen.org, stefanb@linux.vnet.ibm.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, jbeulich@suse.com, samuel.thibault@ens-lyon.org, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org On Tue, 2015-03-10 at 08:13 -0400, Quan Xu wrote: Isn't this patch just a coding style change? If there is any substance I can't spot it, please can you do them separately, or else say in the commit message that this is a coding style cleanup and "no functional change" etc. Also, you seem to have reindented everything by one more space than the surrounding code, which doesn't seem right. > Signed-off-by: Quan Xu > --- > extras/mini-os/tpmback.c | 25 ++++++++++++++----------- > 1 file changed, 14 insertions(+), 11 deletions(-) > > diff --git a/extras/mini-os/tpmback.c b/extras/mini-os/tpmback.c > index 00b66e8..8a0a983 100644 > --- a/extras/mini-os/tpmback.c > +++ b/extras/mini-os/tpmback.c > @@ -608,18 +608,21 @@ int connect_fe(tpmif_t* tpmif) > } > free(value); > > - domid = tpmif->domid; > - if((tpmif->page = gntmap_map_grant_refs(>pmdev.map, 1, &domid, 0, &ringref, PROT_READ | PROT_WRITE)) == NULL) { > - TPMBACK_ERR("Failed to map grant reference %u/%u\n", (unsigned int) tpmif->domid, tpmif->handle); > - return -1; > - } > + domid = (unsigned int)tpmif->domid; > + if ((tpmif->page = gntmap_map_grant_refs(>pmdev.map, 1, &domid, 0, &ringref, > + PROT_READ | PROT_WRITE)) == NULL) { > + TPMBACK_ERR("Failed to map grant reference %u/%u\n", > + tpmif->domid, tpmif->handle); > + return -1; > + } > + > + /* Bind the event channel */ > + if ((evtchn_bind_interdomain(domid, evtchn, tpmback_handler, tpmif, &tpmif->evtchn))) { > + TPMBACK_ERR("%u/%u Unable to bind to interdomain event channel!\n", > + (unsigned int) tpmif->domid, tpmif->handle); > + goto error_post_map; > + } > > - /*Bind the event channel */ > - if((evtchn_bind_interdomain(tpmif->domid, evtchn, tpmback_handler, tpmif, &tpmif->evtchn))) > - { > - TPMBACK_ERR("%u/%u Unable to bind to interdomain event channel!\n", (unsigned int) tpmif->domid, tpmif->handle); > - goto error_post_map; > - } > unmask_evtchn(tpmif->evtchn); > > /* Write the ready flag and change status to connected */