From: Frank Mori Hess Date: Mon, 5 Apr 2004 21:42:11 +0000 (+0000) Subject: remove bogus bug warning X-Git-Tag: r0_7_69~67 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9b2b017076055f4cf98bd10c56caf3218fbeaffb;p=comedi.git remove bogus bug warning --- diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index df14f87e..bf415a01 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -409,6 +409,9 @@ static void ni_sync_ai_dma(struct mite_struct *mite, comedi_device *dev) comedi_buf_write_alloc(s->async, s->async->prealloc_bufsz); nbytes = mite_bytes_transferred(mite, AI_DMA_CHAN); + /* XXX should use mite_bytes_read() for the overrun check + * since mite_bytes_transferred returns a conservative + * lower bound */ if( (int)(nbytes - old_alloc_count) > 0 ){ printk("ni_mio_common: DMA overwrite of free area\n"); ni_ai_reset(dev,s); @@ -418,7 +421,8 @@ static void ni_sync_ai_dma(struct mite_struct *mite, comedi_device *dev) count = nbytes - async->buf_write_count; if( count < 0 ){ - rt_printk("ni_mio_common: BUG: negative ai count\n"); + /* it's possible count will be negative due to + * conservative value returned by mite_bytes_transferred */ return; }