On Fri, Nov 28, 2014 at 02:19:03PM +0000, Russell King - ARM Linux wrote:
> Let's look at the resulting code:
> 
> On Fri, Nov 28, 2014 at 03:08:06PM +0100, Ludovic Desroches wrote:
> > +static int atmci_configure_dma(struct atmel_mci *host)
> >  {
> > +   int ret = 0;
> >  
> > +   host->dma.chan = dma_request_slave_channel_reason(&host->pdev->dev, 
> > "rxtx");
> > +   if (IS_ERR(host->dma.chan))
> > +           return PTR_ERR(host->dma.chan);
> > +
> > +   dev_info(&host->pdev->dev, "using %s for DMA transfers\n",
> > +            dma_chan_name(host->dma.chan));
> > +
> > +   host->dma_conf.src_addr = host->mapbase + ATMCI_RDR;
> > +   host->dma_conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> > +   host->dma_conf.src_maxburst = 1;
> > +   host->dma_conf.dst_addr = host->mapbase + ATMCI_TDR;
> > +   host->dma_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> > +   host->dma_conf.dst_maxburst = 1;
> > +   host->dma_conf.device_fc = false;
> > +
> > +   return ret;
> >  }
> 
> I think you can clean this up a little further - what do you notice
> about the value of "ret" here?

I think I see what you mean :) The fix I have merged for this patch
makes ret useless.

> 
> -- 
> FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
> according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to