Skip to contentSkip to conversation

sound: correct bracketing in spdif test

PATCH In review Harvey Harrison 3 participants 3 messages Oct 22, 2008 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sound: correct bracketing in spdif test

Noticed by sparse:
sound/pci/hda/patch_sigmatel.c:1285:43: warning: dubious: !x & y

---
 sound/pci/hda/patch_sigmatel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/pci/hda/patch_sigmatel.c +1 -1
index a2ac720..788fdc6 100644
@@ -1282,7 +1282,7 @@ static int stac92xx_build_controls(struct hda_codec *codec)
 			return err;
 		spec->multiout.share_spdif = 1;
 	}
-	if (spec->dig_in_nid && (!spec->gpio_dir & 0x01)) {
+	if (spec->dig_in_nid && !(spec->gpio_dir & 0x01)) {
 		err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid);
 		if (err < 0)
 			return err;
Signature · 1 line
1.6.0.2.824.geb4d2
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Harvey Harrison

Noticed by sparse:
sound/pci/hda/patch_sigmatel.c:1285:43: warning: dubious: !x & y

---
 sound/pci/hda/patch_sigmatel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/pci/hda/patch_sigmatel.c +0 -0
index a2ac720..788fdc6 100644

sound/pci/hda/patch_sigmatel.c static int stac92xx_build_controls(struct hda_codec *codec) · line 1288

Quoted 8 lines
sound/pci/hda/patch_sigmatel.c +1 -1
@@ -1282,7 +1282,7 @@ static int stac92xx_build_controls(struct hda_codec *codec)
 			return err;
 		spec->multiout.share_spdif = 1;
 	}
-	if (spec->dig_in_nid && (!spec->gpio_dir & 0x01)) {
+	if (spec->dig_in_nid && !(spec->gpio_dir & 0x01)) {
 		err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid);
 		if (err < 0)
 			return err;

Thanks for finding this.

#2 lore raw

At Tue, 21 Oct 2008 23:38:31 -0400,

Quoted 27 lines · Matthew Ranostay
Quoted 13 lines · Harvey Harrison

Noticed by sparse:
sound/pci/hda/patch_sigmatel.c:1285:43: warning: dubious: !x & y

---
 sound/pci/hda/patch_sigmatel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/pci/hda/patch_sigmatel.c +0 -0
index a2ac720..788fdc6 100644

sound/pci/hda/patch_sigmatel.c static int stac92xx_build_controls(struct hda_codec *codec) · line 1288

Quoted 8 lines
sound/pci/hda/patch_sigmatel.c +1 -1
@@ -1282,7 +1282,7 @@ static int stac92xx_build_controls(struct hda_codec *codec)
 			return err;
 		spec->multiout.share_spdif = 1;
 	}
-	if (spec->dig_in_nid && (!spec->gpio_dir & 0x01)) {
+	if (spec->dig_in_nid && !(spec->gpio_dir & 0x01)) {
 		err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid);
 		if (err < 0)
 			return err;

Thanks for finding this.

Quoted 1 line

Applied now. Thanks!

Takashi