From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MuwLQ-0000uX-Uy for qemu-devel@nongnu.org; Mon, 05 Oct 2009 18:47:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MuwLL-0000u3-Gf for qemu-devel@nongnu.org; Mon, 05 Oct 2009 18:47:51 -0400 Received: from [199.232.76.173] (port=37047 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuwLL-0000tw-9G for qemu-devel@nongnu.org; Mon, 05 Oct 2009 18:47:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48159) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MuwLK-0007Jh-Rg for qemu-devel@nongnu.org; Mon, 05 Oct 2009 18:47:47 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n95MljT5005686 for ; Mon, 5 Oct 2009 18:47:45 -0400 From: Juan Quintela In-Reply-To: <20091005204611.GA4384@redhat.com> (Michael S. Tsirkin's message of "Mon, 5 Oct 2009 22:46:11 +0200") References: <20091005204611.GA4384@redhat.com> Date: Tue, 06 Oct 2009 00:47:28 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH] qemu/pci: clarify pci config load routine List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org "Michael S. Tsirkin" wrote: > PCI load routine has to be called with size equal to 256 (otherwise it > will crash in weird ways). So assert this, Agreed with the assert(). > making code clearer. > Also avoid dynamically sized array on stack - good for portability. size has the right value, namely sizeof(PCIDevice.config). Only real advantage is that you are not using a dynamically sized array on the stack. I don't care one way or another. And as you are more probable to touch that code than me, it is up to you :) Later, Juan.