Received: from eggs.gnu.org ([2001:4830:134:3::10]:44806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUufe-0001U5-Th for qemu-devel@nongnu.org; Mon, 09 Mar 2015 06:12:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUufb-0003tX-P4 for qemu-devel@nongnu.org; Mon, 09 Mar 2015 06:12:22 -0400 Received: from smtp.citrix.com ([66.165.176.89]:20668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUufb-0003t5-Gm for qemu-devel@nongnu.org; Mon, 09 Mar 2015 06:12:19 -0400 Date: Mon, 9 Mar 2015 10:12:11 +0000 From: Wei Liu Message-ID: <20150309101211.GA18491@zion.uk.xensource.com> References: <1425632903-5502-1-git-send-email-tiejun.chen@intel.com> <1425632903-5502-2-git-send-email-tiejun.chen@intel.com> <20150306124003.GO12103@zion.uk.xensource.com> <54FD3D62.6080707@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <54FD3D62.6080707@intel.com> Subject: Re: [Qemu-devel] [PATCH 1/2] libxl: introduce libxl__is_igd_vga_passthru List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Chen, Tiejun" Cc: Wei Liu , ian.campbell@citrix.com, Ian.Jackson@eu.citrix.com, qemu-devel@nongnu.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com On Mon, Mar 09, 2015 at 02:27:46PM +0800, Chen, Tiejun wrote: [...] > >>+ > >>+ FILE *f = fopen(pci_device_vendor_path, "r"); > >>+ if (!f) { > >>+ LOGE(ERROR, > >>+ "pci device "PCI_BDF" does not have vendor attribute", > >>+ pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); > >>+ return 0xffff; > >>+ } > >>+ read_items = fscanf(f, "0x%lx\n", &pci_device_vendor); > > we have to refactor this as well, > > read_items = fscanf(f, "0x%hx\n", &pci_device_vendor); > > Right? > Sure. Just eliminate any warnings / errors. Wei.