|
| From: | Eric Blake |
| Subject: | Re: [Qemu-devel] [PATCH v3 1/3] Switch AMD CFI flash to use new MMIO API |
| Date: | Tue, 28 Nov 2017 14:27:51 -0600 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 11/28/2017 02:05 PM, Eric Blake wrote:
Better yet, please fix the PFLASH_DEBUG code to avoid bitrot in the first place, by rewriting the bad pattern:
into the good pattern:
#ifdef PFLASH_DEBUG
# define PFLASH_PRINT 1
#else
# define PFLASH_PRINT 0
#endif
#define DPRINTF(fmt, ...) \
do { \
if (PFLASH_PRINT) { \
fprintf(stderr, "PFLASH: " fmt, ## __VA_ARGS__); \
}; \
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 finished...
https://wiki.qemu.org/BiteSizedTasks#Bitrot_prevention -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
| [Prev in Thread] | Current Thread | [Next in Thread] |