Skip to contentSkip to conversation

add parentheses

PATCH Applied Roel Kluin 2 participants 2 messages Feb 2, 2008 – Feb 7, 2008 Char and misc drivers

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 add parentheses

'!' has a higher priority than '&': bitanding has no effect.

---

drivers/misc/asus-laptop.c +1 -1
index 7dce318..65c67d1 100644
@@ -322,7 +322,7 @@ static void write_status(acpi_handle handle, int out, int mask)
 
 	switch (mask) {
 	case MLED_ON:
-		out = !out & 0x1;
+		out = !(out & 0x1);
 		break;
 	case GLED_ON:
 		out = (out & 0x1) + 1;
Applied
#1 lore raw

applied.

thanks,
-Len

Quoted 24 lines · Roel Kluin

'!' has a higher priority than '&': bitanding has no effect.

---

drivers/misc/asus-laptop.c +1 -2
index 7dce318..65c67d1 100644
@@ -322,7 +322,7 @@ static void write_status(acpi_handle handle, int out, int mask)
 
 	switch (mask) {
 	case MLED_ON:
-		out = !out & 0x1;
+		out = !(out & 0x1);
 		break;
 	case GLED_ON:
 		out = (out & 0x1) + 1;
 
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/