Re: [PATCH v2 1/5] dmaengine: add ep93xx DMA support

From: Mika Westerberg
Date: Wed Nov 16 2011 - 01:48:38 EST


On Tue, Nov 15, 2011 at 11:59:50AM -0600, H Hartley Sweeten wrote:
> >
> > Index: linux-2.6/drivers/dma/ep93xx_dma.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/dma/ep93xx_dma.c
> > +++ linux-2.6/drivers/dma/ep93xx_dma.c
> > @@ -246,6 +246,7 @@ static void ep93xx_dma_set_active(struct
> > static struct ep93xx_dma_desc *
> > ep93xx_dma_get_active(struct ep93xx_dma_chan *edmac)
> > {
> > + BUG_ON(list_empty(&edmac->active));
>
> BUG_ON is evil...
>
> I'm not sure this is the right way to handle this.
>
> If your doing dma the list should never be empty. If it is I think it should
> have been caught way before this. Mika, do you have any comments?

I agree - the list should never be empty when this is called. The actual bug
is somewhere else.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/