linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsi: Move inline fsi_stream_is_play() before use
@ 2017-05-16 17:20 Geert Uytterhoeven
  2017-05-17  9:51 ` Applied "ASoC: fsi: Move inline fsi_stream_is_play() before use" to the asoc tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2017-05-16 17:20 UTC (permalink / raw)
  To: Kuninori Morimoto, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai
  Cc: Arnd Bergmann, alsa-devel, linux-kernel, Geert Uytterhoeven

With gcc 4.1.2:

    sound/soc/sh/fsi.c:304: warning: ‘fsi_stream_is_play’ declared inline after being called
    sound/soc/sh/fsi.c:304: warning: previous declaration of ‘fsi_stream_is_play’ was here

Move fsi_stream_is_play() up to fix this, removing the need for a
forward declaration as well.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 sound/soc/sh/fsi.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index ead520182e2684fb..7c4bdd82bb955bbb 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -301,7 +301,12 @@ struct fsi_master {
 	spinlock_t lock;
 };
 
-static int fsi_stream_is_play(struct fsi_priv *fsi, struct fsi_stream *io);
+static inline int fsi_stream_is_play(struct fsi_priv *fsi,
+				     struct fsi_stream *io)
+{
+	return &fsi->playback == io;
+}
+
 
 /*
  *		basic read write function
@@ -489,12 +494,6 @@ static void fsi_count_fifo_err(struct fsi_priv *fsi)
 /*
  *		fsi_stream_xx() function
  */
-static inline int fsi_stream_is_play(struct fsi_priv *fsi,
-				     struct fsi_stream *io)
-{
-	return &fsi->playback == io;
-}
-
 static inline struct fsi_stream *fsi_stream_get(struct fsi_priv *fsi,
 					struct snd_pcm_substream *substream)
 {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-17  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-16 17:20 [PATCH] ASoC: fsi: Move inline fsi_stream_is_play() before use Geert Uytterhoeven
2017-05-17  9:51 ` Applied "ASoC: fsi: Move inline fsi_stream_is_play() before use" to the asoc tree Mark Brown

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).