Skip to contentSkip to conversation

arch/tile: misplaced parens near likely

PATCH In review roel 2 participants 2 messages Dec 12, 2011 – Dec 14, 2011

lore
Share & tools
lore

roel

author
#0 lore raw

PATCH 1/1 arch/tile: misplaced parens near likely

Parentheses were missing.

---
 arch/tile/lib/spinlock_32.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

This is what it should be, right?

arch/tile/lib/spinlock_32.c +1 -1
index cb0999f..b16ac49 100644
@@ -144,7 +144,7 @@ void arch_read_unlock(arch_rwlock_t *rwlock)
 	for (;;) {
 		__insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 1);
 		val = __insn_tns((int *)&rwlock->lock);
-		if (likely(val & 1) == 0) {
+		if (likely((val & 1) == 0)) {
 			rwlock->lock = val - (1 << _RD_COUNT_SHIFT);
 			__insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 0);
 			break;
#1 lore raw
Quoted 3 lines · roel

Parentheses were missing.

Thanks, I'll take this into the tile tree.

Quoted 19 lines
---
 arch/tile/lib/spinlock_32.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

This is what it should be, right?

arch/tile/lib/spinlock_32.c +1 -1
index cb0999f..b16ac49 100644
@@ -144,7 +144,7 @@ void arch_read_unlock(arch_rwlock_t *rwlock)
 	for (;;) {
 		__insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 1);
 		val = __insn_tns((int *)&rwlock->lock);
-		if (likely(val & 1) == 0) {
+		if (likely((val & 1) == 0)) {
 			rwlock->lock = val - (1 << _RD_COUNT_SHIFT);
 			__insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 0);
 			break;
Signature · 2 lines
Chris Metcalf, Tilera Corp.
http://www.tilera.com