* [Qemu-devel] [PATCH] ide: Turn debug messages into assertions
@ 2011-05-09 9:52 Kevin Wolf
2011-05-09 12:19 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wolf @ 2011-05-09 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
These printfs aren't really debug messages, but clearly indicate a bug if they
ever become effective. Noone uses DEBUG_IDE, let's re-enable the check
unconditionally and make it an assertion instead of printfs in the device
emulation.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hw/ide/pci.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index f5ac932..a4726ad 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -296,12 +296,8 @@ void bmdma_cmd_writeb(void *opaque, uint32_t addr, uint32_t val)
*/
if (bm->bus->dma->aiocb) {
qemu_aio_flush();
-#ifdef DEBUG_IDE
- if (bm->bus->dma->aiocb)
- printf("ide_dma_cancel: aiocb still pending\n");
- if (bm->status & BM_STATUS_DMAING)
- printf("ide_dma_cancel: BM_STATUS_DMAING still pending\n");
-#endif
+ assert(bm->bus->dma->aiocb == NULL);
+ assert((bm->status & BM_STATUS_DMAING) == 0);
}
} else {
bm->cur_addr = bm->addr;
--
1.7.2.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] ide: Turn debug messages into assertions
2011-05-09 9:52 [Qemu-devel] [PATCH] ide: Turn debug messages into assertions Kevin Wolf
@ 2011-05-09 12:19 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2011-05-09 12:19 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
On Mon, May 9, 2011 at 10:52 AM, Kevin Wolf <kwolf@redhat.com> wrote:
> These printfs aren't really debug messages, but clearly indicate a bug if they
> ever become effective. Noone uses DEBUG_IDE, let's re-enable the check
> unconditionally and make it an assertion instead of printfs in the device
> emulation.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> hw/ide/pci.c | 8 ++------
> 1 files changed, 2 insertions(+), 6 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-09 12:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-09 9:52 [Qemu-devel] [PATCH] ide: Turn debug messages into assertions Kevin Wolf
2011-05-09 12:19 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).