summaryrefslogtreecommitdiffstats
path: root/target-cris/mmu.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2014-11-13 10:24:40 +0000
committerKevin Wolf <kwolf@redhat.com>2014-12-10 10:31:12 +0100
commit192cf55cc02dc0838bbfa5ac17feb7f6c1651441 (patch)
tree713682c7ed8a29d092a957e89ff0285c755dd238 /target-cris/mmu.c
parentf48a33b608b6d98cbe2eaba27cbae925fc221284 (diff)
downloadhqemu-192cf55cc02dc0838bbfa5ac17feb7f6c1651441.zip
hqemu-192cf55cc02dc0838bbfa5ac17feb7f6c1651441.tar.gz
ahci: avoid #ifdef DEBUG_AHCI bitrot
Debug code using #ifdef is susceptible to bitrot because the compiler never checks the debug code. This is easy to avoid, change the DPRINTF() macro to use if (DEBUG_AHCI) and always give it a 0 or 1 value. This also allows us to drop an #ifdef DEBUG_AHCI in ahci_start_dma() since the compiler can now see the local variable is used. The motivation for this change is a recent DEBUG_AHCI build failure due to an outdated DPRINTF() format string. From now on the compiler will catch these errors. Cc: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1415874281-7371-2-git-send-email-stefanha@redhat.com Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'target-cris/mmu.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud