linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: firewire-motu: mark trace helpers as __maybe_unused
@ 2017-04-19 17:51 Arnd Bergmann
  2017-04-20 10:51 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2017-04-19 17:51 UTC (permalink / raw)
  To: Clemens Ladisch, Jaroslav Kysela, Takashi Iwai
  Cc: Arnd Bergmann, Takashi Sakamoto, alsa-devel, linux-kernel

Two functions were introduced for the purpose of tracing but cause warnings
when tracing is disabled:

sound/firewire/motu/amdtp-motu.c:284:13: error: 'copy_message' defined but not used [-Werror=unused-function]
 static void copy_message(u64 *frames, __be32 *buffer, unsigned int data_blocks,
sound/firewire/motu/amdtp-motu.c:271:13: error: 'copy_sph' defined but not used [-Werror=unused-function]
 static void copy_sph(u32 *frames, __be32 *buffer, unsigned int data_blocks,

Marking them as __maybe_unused will do the right thing here.

Fixes: 17909c1b3058 ("ALSA: firewire-motu: add tracepoints for SPH in IEC 61883-1 fashion")
Fixes: c6b0b9e65f09 ("ALSA: firewire-motu: add tracepoints for messages for unique protocol")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/firewire/motu/amdtp-motu.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/sound/firewire/motu/amdtp-motu.c b/sound/firewire/motu/amdtp-motu.c
index 996b5f818918..96f0091144bb 100644
--- a/sound/firewire/motu/amdtp-motu.c
+++ b/sound/firewire/motu/amdtp-motu.c
@@ -268,8 +268,9 @@ static void read_midi_messages(struct amdtp_stream *s, __be32 *buffer,
 }
 
 /* For tracepoints. */
-static void copy_sph(u32 *frames, __be32 *buffer, unsigned int data_blocks,
-		     unsigned int data_block_quadlets)
+static void __maybe_unused copy_sph(u32 *frames, __be32 *buffer,
+				    unsigned int data_blocks,
+				    unsigned int data_block_quadlets)
 {
 	unsigned int i;
 
@@ -281,8 +282,9 @@ static void copy_sph(u32 *frames, __be32 *buffer, unsigned int data_blocks,
 }
 
 /* For tracepoints. */
-static void copy_message(u64 *frames, __be32 *buffer, unsigned int data_blocks,
-			 unsigned int data_block_quadlets)
+static void __maybe_unused copy_message(u64 *frames, __be32 *buffer,
+					unsigned int data_blocks,
+					unsigned int data_block_quadlets)
 {
 	unsigned int i;
 
-- 
2.9.0

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

end of thread, other threads:[~2017-04-20 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 17:51 [PATCH] ALSA: firewire-motu: mark trace helpers as __maybe_unused Arnd Bergmann
2017-04-20 10:51 ` Takashi Iwai
     [not found]   ` <f6d6ac28-12ad-1845-6fac-7b5f7de6da39@sakamocchi.jp>
2017-04-20 13:01     ` Takashi Iwai

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