From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQLTH-0005dv-Tq for qemu-devel@nongnu.org; Fri, 14 Aug 2015 16:21:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQLTE-0003RN-DD for qemu-devel@nongnu.org; Fri, 14 Aug 2015 16:20:59 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:46247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQLTE-0003QA-2r for qemu-devel@nongnu.org; Fri, 14 Aug 2015 16:20:56 -0400 Date: Fri, 14 Aug 2015 16:20:43 -0400 From: Konrad Rzeszutek Wilk Message-ID: <20150814202043.GA14015@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-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v1 08/10] xen/pt: Make xen_pt_unregister_device idempotent List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: xen-devel@lists.xenproject.org, qemu-devel@nongnu.org, JBeulich@suse.com > > @@ -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.