Skip to contentSkip to conversation

ALSA: firewire-digi00x: Drop bogus const type qualifier on dot_scrt()

PATCH In review Geert Uytterhoeven 3 participants 3 messages Feb 8, 2016 – Feb 9, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: firewire-digi00x: Drop bogus const type qualifier on dot_scrt()

sound/firewire/digi00x/amdtp-dot.c:67: warning: type qualifiers ignored on function return type

Drop the bogus "const" type qualifier on the return type of dot_scrt() to fix this.

---
 sound/firewire/digi00x/amdtp-dot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/firewire/digi00x/amdtp-dot.c +1 -1
index b02a5e8cad448c40..0ac92aba5bc1c9a4 100644
@@ -63,7 +63,7 @@ struct amdtp_dot {
 #define BYTE_PER_SAMPLE (4)
 #define MAGIC_DOT_BYTE (2)
 #define MAGIC_BYTE_OFF(x) (((x) * BYTE_PER_SAMPLE) + MAGIC_DOT_BYTE)
-static const u8 dot_scrt(const u8 idx, const unsigned int off)
+static u8 dot_scrt(const u8 idx, const unsigned int off)
 {
 	/*
 	 * the length of the added pattern only depends on the lower nibble
Signature · 1 line
1.9.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Geert Uytterhoeven

sound/firewire/digi00x/amdtp-dot.c:67: warning: type qualifiers ignored on function return type

Drop the bogus "const" type qualifier on the return type of dot_scrt() to fix this.

Yep. It came from original code[1] and I overlooked.

Quoted 9 lines
---
 sound/firewire/digi00x/amdtp-dot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/firewire/digi00x/amdtp-dot.c +0 -0
index b02a5e8cad448c40..0ac92aba5bc1c9a4 100644

sound/firewire/digi00x/amdtp-dot.c struct amdtp_dot { · line 69

Quoted 8 lines
sound/firewire/digi00x/amdtp-dot.c +1 -1
@@ -63,7 +63,7 @@ struct amdtp_dot {
 #define BYTE_PER_SAMPLE (4)
 #define MAGIC_DOT_BYTE (2)
 #define MAGIC_BYTE_OFF(x) (((x) * BYTE_PER_SAMPLE) + MAGIC_DOT_BYTE)
-static const u8 dot_scrt(const u8 idx, const unsigned int off)
+static u8 dot_scrt(const u8 idx, const unsigned int off)
 {
 	/*
 	 * the length of the added pattern only depends on the lower nibble

Thanks

[1] https://github.com/x42/003amdtp

Takashi Sakamoto

#2 lore raw
In reply to Geert Uytterhoeven
Quoted 7 lines · Geert Uytterhoeven

sound/firewire/digi00x/amdtp-dot.c:67: warning: type qualifiers ignored on function return type

Drop the bogus "const" type qualifier on the return type of dot_scrt() to fix this.

Applied now, thanks.

Takashi

Quoted 21 lines
---
 sound/firewire/digi00x/amdtp-dot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/firewire/digi00x/amdtp-dot.c +1 -1
index b02a5e8cad448c40..0ac92aba5bc1c9a4 100644
@@ -63,7 +63,7 @@ struct amdtp_dot {
 #define BYTE_PER_SAMPLE (4)
 #define MAGIC_DOT_BYTE (2)
 #define MAGIC_BYTE_OFF(x) (((x) * BYTE_PER_SAMPLE) + MAGIC_DOT_BYTE)
-static const u8 dot_scrt(const u8 idx, const unsigned int off)
+static u8 dot_scrt(const u8 idx, const unsigned int off)
 {
 	/*
 	 * the length of the added pattern only depends on the lower nibble
Signature · 1 line
1.9.1