Re: [PATCH] dw_dmac: switch to use dma_pool API

From: Andy Shevchenko
Date: Wed Jan 16 2013 - 08:39:11 EST


On Wed, 2013-01-16 at 15:18 +0530, Viresh Kumar wrote:
> > @@ -1125,7 +1083,6 @@ static int dwc_alloc_chan_resources(struct dma_chan *chan)
> > + memset(desc, 0, sizeof(struct dw_desc));
> > +
>
> why do we need this? We always fill all fields of this structure, isn't it?

No, it is not. At least we don't fill everything at
alloc_chan_resources() stage. Previous code used kzalloc. I decide to
use memset to avoid potential side effects in the future.

--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
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/