Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] dmaengine: mmp-tdma: fix terminate_all return code
Date: Tue, 13 Jan 2015 14:31:46 +0100	[thread overview]
Message-ID: <9755822.HDlnFBj4xE@wuerfel> (raw)
In-Reply-To: <2099590.pAO9NcseBT@wuerfel>

In a recent cleanup, the mmp_tdma_terminate_all function was
introduced but does not set a proper return value. Almost
no slave driver uses that return value, but if one does, the
result will be undefined, which the compiler warns about:

dma/mmp_tdma.c: In function 'mmp_tdma_terminate_all':
dma/mmp_tdma.c:474:1: warning: no return statement in function returning non-void [-Wreturn-type]

This changes the driver to return zero, like most other
drivers do.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: f43a6fd400ba6 ("dmaengine: mmp-tdma: Split device_control")

diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index 91fb241102f7..70c2fa9963cd 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -471,6 +471,8 @@ static int mmp_tdma_terminate_all(struct dma_chan *chan)
 	mmp_tdma_disable_chan(chan);
 	/* disable interrupt */
 	mmp_tdma_enable_irq(tdmac, false);
+
+	return 0;
 }
 
 static int mmp_tdma_config(struct dma_chan *chan,

  reply	other threads:[~2015-01-13 13:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 13:25 [PATCH 1/2] dmaengine: mmp-tdma: don't include mach/regs-icu.h Arnd Bergmann
2015-01-13 13:31 ` Arnd Bergmann [this message]
2015-01-13 14:43 ` Vinod Koul

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=9755822.HDlnFBj4xE@wuerfel \
    --to=arnd@arndb.de \
    --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