From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJmU5-0006gG-5x for qemu-devel@nongnu.org; Tue, 28 Nov 2017 15:28:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJmU4-00086x-8n for qemu-devel@nongnu.org; Tue, 28 Nov 2017 15:28:01 -0500 References: <20171113161446.2862-1-michael.nawrocki@gtri.gatech.edu> <20171113161446.2862-2-michael.nawrocki@gtri.gatech.edu> From: Eric Blake Message-ID: <1fbc3c84-b197-7da0-b70d-a95952e87860@redhat.com> Date: Tue, 28 Nov 2017 14:27:51 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 1/3] Switch AMD CFI flash to use new MMIO API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Nawrocki , Peter Maydell Cc: Kevin Wolf , Paolo Bonzini , QEMU Developers , Qemu-block , Max Reitz On 11/28/2017 02:05 PM, Eric Blake wrote: > Better yet, please fix the PFLASH_DEBUG code to avoid bitrot in the=20 > first place, by rewriting the bad pattern: >=20 > into the good pattern: >=20 > #ifdef PFLASH_DEBUG > # define PFLASH_PRINT 1 > #else > # define PFLASH_PRINT 0 > #endif > #define DPRINTF(fmt, ...) \ > do { \ > =C2=A0 if (PFLASH_PRINT) { \ > =C2=A0=C2=A0=C2=A0 fprintf(stderr, "PFLASH: " fmt, ## __VA_ARGS__); \ > =C2=A0 }; \ Serves me right for typing this without testing; the extra ; is spurious. By the way, this is one of the Bite-Sized Tasks that never seems to get=20 finished... https://wiki.qemu.org/BiteSizedTasks#Bitrot_prevention --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org