Re: [PATCH v3] dw_dmac: don't exceed AHB master number indwc_get_data_width

From: Andy Shevchenko
Date: Wed Jan 16 2013 - 10:02:59 EST


On Wed, 2013-01-16 at 19:37 +0530, Viresh Kumar wrote:
> On Wed, Jan 16, 2013 at 7:18 PM, Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > +static inline unsigned int dwc_get_master(struct dma_chan *chan, int master)
> > +{
> > + struct dw_dma *dw = to_dw_dma(chan->device);
> > + struct dw_dma_slave *dws = chan->private;
> > + unsigned int m = 0;
>
> :(

There a protection of wrong master parameter.

In the code I did
if ()
m = ...
else if ()
m = ...

Otherwise it would be 0.


--
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/