From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtwwQ-00083R-FL for qemu-devel@nongnu.org; Tue, 02 Jul 2013 05:32:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UtwwO-0005zI-6L for qemu-devel@nongnu.org; Tue, 02 Jul 2013 05:32:06 -0400 Received: from goliath.siemens.de ([192.35.17.28]:29358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtwwN-0005yV-T2 for qemu-devel@nongnu.org; Tue, 02 Jul 2013 05:32:04 -0400 Message-ID: <51D29E0F.5000208@siemens.com> Date: Tue, 02 Jul 2013 11:31:59 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1372438702-20491-1-git-send-email-pbonzini@redhat.com> <1372438702-20491-7-git-send-email-pbonzini@redhat.com> <51D1CB70.9050308@siemens.com> <51D27638.4030804@redhat.com> <51D27D38.2090309@siemens.com> <51D28CF0.4090806@redhat.com> <51D29104.6020109@siemens.com> <51D29D40.1050601@redhat.com> In-Reply-To: <51D29D40.1050601@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 06/11] memory: add ref/unref calls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: "peter.maydell@linaro.org" , "qemu-devel@nongnu.org" On 2013-07-02 11:28, Paolo Bonzini wrote: > Il 02/07/2013 10:36, Jan Kiszka ha scritto: >>>>>> Hmm, two solutions for one problem - can we improve this in the next round? >>>> >>>> Sure, I can adapt the hw/acpi/piix4.c to use ifs in the same style as >>>> hw/isa/lpc_ich9.c (I find the code easier to read). >> I was more referring to memory_region_present vs. open-coding. > > Understood, but once you replace ?: with "if", the memory_region_present > wrapper loses most of the appeal. So I actually prefer the open-coded one. Well, count the memory_region_unref calls. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux