From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utwt5-00067a-Nh for qemu-devel@nongnu.org; Tue, 02 Jul 2013 05:28:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Utwt4-0004XD-Kg for qemu-devel@nongnu.org; Tue, 02 Jul 2013 05:28:39 -0400 Received: from mail-bk0-x22c.google.com ([2a00:1450:4008:c01::22c]:51080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utwt4-0004X4-DP for qemu-devel@nongnu.org; Tue, 02 Jul 2013 05:28:38 -0400 Received: by mail-bk0-f44.google.com with SMTP id 6so568896bkj.3 for ; Tue, 02 Jul 2013 02:28:37 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51D29D40.1050601@redhat.com> Date: Tue, 02 Jul 2013 11:28:32 +0200 From: Paolo Bonzini 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> In-Reply-To: <51D29104.6020109@siemens.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: Jan Kiszka Cc: "peter.maydell@linaro.org" , "qemu-devel@nongnu.org" 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. Paolo