Skip to contentSkip to conversation

Odd no-op in sound/pci/hda/patch_sigmatel.c

DISCUSSION Rasmus Villemoes 2 participants 2 messages Jan 5, 2015 Sound

lore
Share & tools
lore
#0 lore raw

Hi Takashi

The "spec->gpio_mask &= spec->gpio_mask" on line 571 of sound/pci/hda/patch_sigmatel.c is obviously a no-op. Is that on purpose, or was it supposed to be something else?

Rasmus

#1 lore raw

At Mon, 05 Jan 2015 13:21:17 +0100,

Quoted 6 lines · Rasmus Villemoes

Hi Takashi

The "spec->gpio_mask &= spec->gpio_mask" on line 571 of sound/pci/hda/patch_sigmatel.c is obviously a no-op. Is that on purpose, or was it supposed to be something else?

It's obviously a copy&paste error. The correct code would be:

sound/pci/hda/patch_sigmatel.c +2 -2
index 4f6413e01c13..605d14003d25 100644
@@ -568,9 +568,9 @@ static void stac_store_hints(struct hda_codec *codec)
 			spec->gpio_mask;
 	}
 	if (get_int_hint(codec, "gpio_dir", &spec->gpio_dir))
-		spec->gpio_mask &= spec->gpio_mask;
-	if (get_int_hint(codec, "gpio_data", &spec->gpio_data))
 		spec->gpio_dir &= spec->gpio_mask;
+	if (get_int_hint(codec, "gpio_data", &spec->gpio_data))
+		spec->gpio_data &= spec->gpio_mask;
 	if (get_int_hint(codec, "eapd_mask", &spec->eapd_mask))
 		spec->eapd_mask &= spec->gpio_mask;
 	if (get_int_hint(codec, "gpio_mute", &spec->gpio_mute))

I'll fix this with your reported-by credit.

thanks,

Takashi