From: Ian Jackson Subject: Re: [PATCH] qemu-xen: read default pci passthrough values Date: Thu, 3 Feb 2011 19:06:16 +0000 Message-ID: <19786.64680.934208.343606@mariner.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Stefano Stabellini writes ("[Xen-devel] [PATCH] qemu-xen: read default pci passthrough values"): > If there are no devices assigned to the domain at boot, we don't read > the default pci passthrough parameters. > This patch fixes it. The semantics you intend seem sensible, but: The variable "num" seems completely unused after we went to all the effort of reading num_devs to get it. The code seems to read .../num_devs just to check that the key exists, and doesn't mind "0" as an answer. With your patch applied, we don't even care whether the key exists. So why do we bother reading .../num_devs and converting it to an integer and assigning it to nums ? Ian.