From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UttTS-0004va-Jc for qemu-devel@nongnu.org; Tue, 02 Jul 2013 01:49:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UttTR-0004wb-Pt for qemu-devel@nongnu.org; Tue, 02 Jul 2013 01:49:58 -0400 Received: from mail-bk0-x22b.google.com ([2a00:1450:4008:c01::22b]:36449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UttTR-0004wS-Je for qemu-devel@nongnu.org; Tue, 02 Jul 2013 01:49:57 -0400 Received: by mail-bk0-f43.google.com with SMTP id jm2so2073987bkc.16 for ; Mon, 01 Jul 2013 22:49:56 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51D269FF.2010601@redhat.com> Date: Tue, 02 Jul 2013 07:49:51 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1372169705-7645-1-git-send-email-pbonzini@redhat.com> <1372169705-7645-25-git-send-email-pbonzini@redhat.com> <51D213CE.6010003@suse.de> In-Reply-To: <51D213CE.6010003@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 24/24] hw/[u-x]*: pass owner to memory_region_init_io List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: peter.maydell@linaro.org, alex.williamson@redhat.com, qemu-devel@nongnu.org, Anthony Liguori Il 02/07/2013 01:42, Andreas Färber ha scritto: > I happened to notice that the scripted approach you describe in the > cover letter causes some unnecessary indirection here: > In this hunk a human could've just supplied the function argument obj. > But since OBJECT() is not a dynamic cast and f is referenced on the same > line for the MemoryRegion itself, I guess there is no harm in always > using OBJECT(f) for simplicity. The conversion actually wasn't scripted, only the review. I used OBJECT(f) because it was easier to think about, and any mistakes (opaques that are not QOM objects) would be caught during the scripted review. Paolo