From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 4/4] mmc: atmel-mci: use probe deferring if dma controller is not ready yet
Date: Fri, 28 Nov 2014 14:19:03 +0000 [thread overview]
Message-ID: <20141128141903.GT3836@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1417183686-31481-5-git-send-email-ludovic.desroches@atmel.com>
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?
--
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2014-11-28 14:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-28 14:08 [PATCH v3 0/4] mmc: atmel-mci: cleanup and probe deferring Ludovic Desroches
2014-11-28 14:08 ` [PATCH v3 1/4] mmc: atmel-mci: remove useless DMA stuff for non-dt devices Ludovic Desroches
2014-11-28 14:08 ` [PATCH v3 2/4] mmc: atmel-mci: remove __init/__exit attributes Ludovic Desroches
2014-11-28 14:16 ` Russell King - ARM Linux
2014-11-28 14:08 ` [PATCH v3 3/4] mmc: atmel-mci: stop using specific initcall Ludovic Desroches
2014-11-28 14:08 ` [PATCH v3 4/4] mmc: atmel-mci: use probe deferring if dma controller is not ready yet Ludovic Desroches
2014-11-28 14:19 ` Russell King - ARM Linux [this message]
2014-11-28 14:35 ` Ludovic Desroches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141128141903.GT3836@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).