From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v1 08/10] xen/pt: Make xen_pt_unregister_device idempotent Date: Fri, 14 Aug 2015 16:20:43 -0400 Message-ID: <20150814202043.GA14015__8495.07653988457$1439584133$gmane$org@l.oracle.com> References: <1435866681-18468-1-git-send-email-konrad.wilk@oracle.com> <1435866681-18468-9-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZQLTD-0004Fp-Mz for xen-devel@lists.xenproject.org; Fri, 14 Aug 2015 20:20:55 +0000 Content-Disposition: inline In-Reply-To: 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: xen-devel@lists.xenproject.org, qemu-devel@nongnu.org, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org > > @@ -818,10 +819,13 @@ static void xen_pt_unregister_device(PCIDevice *d) > > { > > XenPCIPassthroughState *s = XEN_PT_DEVICE(d); > > uint8_t machine_irq = s->machine_irq; > > - uint8_t intx = xen_pt_pci_intx(s); > > + uint8_t intx; > > int rc; > > > > - if (machine_irq) { > > + /* Note that if xen_host_pci_device_put had closed config_fd, then > > + * intx value becomes 0xff. */ > > + intx = xen_pt_pci_intx(s); > > Wouldn't it make sense to move this assignment inside the if below? Totally. Plus it also allows me to remove the comment above. > > Aside from this small item: > > Reviewed-by: Stefano Stabellini Thank you.