Skip to contentSkip to conversation

asoc: soc-core: fix coccinelle warnings

PATCH In review Nenghua Cao 2 participants 2 messages Mar 3, 2014 – Mar 4, 2014

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

PATCH 1/1 asoc: soc-core: fix coccinelle warnings

From: Nenghua Cao <[email protected]>

sound/soc/soc-core.c:2708:6-13: WARNING: Assignment of bool to 0/1
sound/soc/soc-core.c:2726:3-10: WARNING: Assignment of bool to 0/1

More information about semantic patching is available at
http://coccinelle.lip6.fr/

---
 sound/soc/soc-core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/soc-core.c +2 -2
index fb598cb..d92eb93 100644
@@ -2818,7 +2818,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
 	unsigned int mask = (1 << fls(max)) - 1;
 	unsigned int invert = mc->invert;
 	int err;
-	bool type_2r = 0;
+	bool type_2r = false;
 	unsigned int val2 = 0;
 	unsigned int val, val_mask;
 
@@ -2836,7 +2836,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
 			val |= val2 << rshift;
 		} else {
 			val2 = val2 << shift;
-			type_2r = 1;
+			type_2r = true;
 		}
 	}
 	err = snd_soc_update_bits_locked(codec, reg, val_mask, val);
Signature · 1 line
1.7.0.4
maintainer
#1 lore raw
Quoted 6 lines · Nenghua Cao

From: Nenghua Cao <[email protected]>

sound/soc/soc-core.c:2708:6-13: WARNING: Assignment of bool to 0/1
sound/soc/soc-core.c:2726:3-10: WARNING: Assignment of bool to 0/1

Applied, thanks. Please use subject lines consistnt with the style for the subsystem, CC the mailing list for the subsystem and send the patch to the maintainers in MAINTAINERS (you've used Liam's work address but he lists his kernel.org address for upstream).