From: Vinod Koul <vkoul@kernel.org>
To: Lukas Wunner <lukas@wunner.de>
Cc: Eric Anholt <eric@anholt.net>,
Stefan Wahren <stefan.wahren@i2se.com>,
Frank Pavlic <f.pavlic@kunbus.de>,
Martin Sperl <kernel@martin.sperl.org>,
Florian Meier <florian.meier@koalo.de>,
dmaengine@vger.kernel.org, linux-rpi-kernel@lists.infradead.org
Subject: [3/5] dmaengine: bcm2835: Clean up abort of transactions
Date: Mon, 7 Jan 2019 13:56:43 +0530 [thread overview]
Message-ID: <20190107082643.GA13372@vkoul-mobl.Dlink> (raw)
On 22-12-18, 08:28, Lukas Wunner wrote:
> bcm2835_dma_abort() returns an int but bcm2835_dma_terminate_all() (its
> sole caller) does not evaluate the return value. Change the return type
> to void.
>
> Also, the "cs" variable is dispensable, so remove it. Its type seems
Please make it two different commits...
> wrong anyway, "unsigned long" is 64-bit on arm64, yet the CS register is
> 32-bit.
>
> Signed-off-by: Lukas Wunner <lukas@wunner.de>
> Cc: Frank Pavlic <f.pavlic@kunbus.de>
> Cc: Martin Sperl <kernel@martin.sperl.org>
> Cc: Florian Meier <florian.meier@koalo.de>
> ---
> drivers/dma/bcm2835-dma.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c
> index 17bc7304db3a..a3ecb7fd4fc2 100644
> --- a/drivers/dma/bcm2835-dma.c
> +++ b/drivers/dma/bcm2835-dma.c
> @@ -406,14 +406,12 @@ static void bcm2835_dma_fill_cb_chain_with_sg(
> }
> }
>
> -static int bcm2835_dma_abort(void __iomem *chan_base)
> +static void bcm2835_dma_abort(void __iomem *chan_base)
> {
> - unsigned long cs;
> long int timeout = 10000;
>
> - cs = readl(chan_base + BCM2835_DMA_CS);
> - if (!(cs & BCM2835_DMA_ACTIVE))
> - return 0;
> + if (!(readl(chan_base + BCM2835_DMA_CS) & BCM2835_DMA_ACTIVE))
> + return;
>
> /* Write 0 to the active bit - Pause the DMA */
> writel(0, chan_base + BCM2835_DMA_CS);
> @@ -424,7 +422,6 @@ static int bcm2835_dma_abort(void __iomem *chan_base)
> cpu_relax();
>
> writel(BCM2835_DMA_RESET, chan_base + BCM2835_DMA_CS);
> - return 0;
> }
>
> static void bcm2835_dma_start_desc(struct bcm2835_chan *c)
> --
> 2.19.2
next reply other threads:[~2019-01-07 8:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 8:26 Vinod Koul [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-12-22 7:28 [3/5] dmaengine: bcm2835: Clean up abort of transactions Lukas Wunner
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=20190107082643.GA13372@vkoul-mobl.Dlink \
--to=vkoul@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=eric@anholt.net \
--cc=f.pavlic@kunbus.de \
--cc=florian.meier@koalo.de \
--cc=kernel@martin.sperl.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=lukas@wunner.de \
--cc=stefan.wahren@i2se.com \
/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