dbdma: always define DBDMA_DPRINTF and enable debug with DEBUG_DBDMA

Enabling DBDMA_DPRINTF unconditionally ensures that any errors in debug
statements are picked up immediately.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Mark Cave-Ayland 2016-07-10 19:08:53 +01:00 committed by David Gibson
parent 44d691f7d9
commit ba0b17dd8f

View File

@ -45,14 +45,13 @@
#include "sysemu/dma.h" #include "sysemu/dma.h"
/* debug DBDMA */ /* debug DBDMA */
//#define DEBUG_DBDMA #define DEBUG_DBDMA 0
#ifdef DEBUG_DBDMA #define DBDMA_DPRINTF(fmt, ...) do { \
#define DBDMA_DPRINTF(fmt, ...) \ if (DEBUG_DBDMA) { \
do { printf("DBDMA: " fmt , ## __VA_ARGS__); } while (0) printf("DBDMA: " fmt , ## __VA_ARGS__); \
#else } \
#define DBDMA_DPRINTF(fmt, ...) } while (0);
#endif
/* /*
*/ */
@ -62,7 +61,7 @@ static DBDMAState *dbdma_from_ch(DBDMA_channel *ch)
return container_of(ch, DBDMAState, channels[ch->channel]); return container_of(ch, DBDMAState, channels[ch->channel]);
} }
#ifdef DEBUG_DBDMA #if DEBUG_DBDMA
static void dump_dbdma_cmd(dbdma_cmd *cmd) static void dump_dbdma_cmd(dbdma_cmd *cmd)
{ {
printf("dbdma_cmd %p\n", cmd); printf("dbdma_cmd %p\n", cmd);