Skip to contentSkip to conversation

ASoC: adau1701: type bug with ADAU1707_CLKDIV_UNSET

PATCH Applied Dan Carpenter 3 participants 3 messages Jul 25, 2013 – Jul 26, 2013

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

PATCH 1/1 ASoC: adau1701: type bug with ADAU1707_CLKDIV_UNSET

ADAU1707_CLKDIV_UNSET is always compared against an unsigned int and not an unsigned long. The current tests are always false.

sound/soc/codecs/adau1701.c +1 -1
index 44d8a95..2c10252 100644
@@ -91,7 +91,7 @@
 #define ADAU1701_OSCIPOW_OPD		0x04
 #define ADAU1701_DACSET_DACINIT		1
 
-#define ADAU1707_CLKDIV_UNSET		(-1UL)
+#define ADAU1707_CLKDIV_UNSET		(-1U)
 
 #define ADAU1701_FIRMWARE "adau1701.bin"
 
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Dan Carpenter

ADAU1707_CLKDIV_UNSET is always compared against an unsigned int and not an unsigned long. The current tests are always false.

Well, in my case, sizeof(unsigned int) equals sizeof(unsigned long), so it didn't hit me. But it should be fixed of course, thanks for catching.

Quoted 1 line
Quoted 19 lines
sound/soc/codecs/adau1701.c +1 -1
index 44d8a95..2c10252 100644
@@ -91,7 +91,7 @@
 #define ADAU1701_OSCIPOW_OPD		0x04
 #define ADAU1701_DACSET_DACINIT		1
 
-#define ADAU1707_CLKDIV_UNSET		(-1UL)
+#define ADAU1707_CLKDIV_UNSET		(-1U)
 
 #define ADAU1701_FIRMWARE "adau1701.bin"
 

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

maintainer Applied
#2 lore raw
In reply to Dan Carpenter
Quoted 2 lines · Dan Carpenter

ADAU1707_CLKDIV_UNSET is always compared against an unsigned int and not an unsigned long. The current tests are always false.

Applied, thanks.