Skip to contentSkip to conversation

sound/ppc/powermac: remove undefined operations

PATCH In review Andreas Schwab 2 participants 2 messages Sep 11, 2010 – Sep 14, 2010 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sound/ppc/powermac: remove undefined operations

Modifying an object twice without an intervening sequence point is undefined.

---
 sound/ppc/tumbler.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/ppc/tumbler.c +1 -1
index 20afdf9..961d982 100644
@@ -785,7 +785,7 @@ static int snapper_set_capture_source(struct pmac_tumbler *mix)
 	if (! mix->i2c.client)
 		return -ENODEV;
 	if (mix->capture_source)
-		mix->acs = mix->acs |= 2;
+		mix->acs |= 2;
 	else
 		mix->acs &= ~2;
 	return i2c_smbus_write_byte_data(mix->i2c.client, TAS_REG_ACS, mix->acs);
Signature · 6 lines
1.7.2.3

-- 
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#1 lore raw

At Sat, 11 Sep 2010 13:16:41 +0200,

Quoted 5 lines · Andreas Schwab

Modifying an object twice without an intervening sequence point is undefined.

Applied now. Thanks.

Takashi

Quoted 29 lines
---
 sound/ppc/tumbler.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/ppc/tumbler.c +1 -1
index 20afdf9..961d982 100644
@@ -785,7 +785,7 @@ static int snapper_set_capture_source(struct pmac_tumbler *mix)
 	if (! mix->i2c.client)
 		return -ENODEV;
 	if (mix->capture_source)
-		mix->acs = mix->acs |= 2;
+		mix->acs |= 2;
 	else
 		mix->acs &= ~2;
 	return i2c_smbus_write_byte_data(mix->i2c.client, TAS_REG_ACS, mix->acs);
Signature · 10 lines
1.7.2.3

-- 
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel