Skip to contentSkip to conversation

bfin_5xx: misplaced parentheses

PATCH In review Roel Kluin 2 participants 2 messages Apr 16, 2009 – Apr 20, 2009

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 bfin_5xx: misplaced parentheses

!' has a higher precedence than &', parentheses are misplaced.

---

drivers/serial/bfin_5xx.c +3 -3
index 18ba812..d86123e 100644
@@ -166,7 +166,7 @@ static void bfin_serial_start_tx(struct uart_port *port)
 	struct tty_struct *tty = uart->port.info->port.tty;
 
 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
-	if (uart->scts && (!bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
+	if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) & TIOCM_CTS)) {
 		uart->scts = 0;
 		uart_handle_cts_change(&uart->port, uart->scts);
 	}
@@ -368,7 +368,7 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id)
 	struct bfin_serial_port *uart = dev_id;
 
 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
-	if (uart->scts && (!bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
+	if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) & TIOCM_CTS)) {
 		uart->scts = 0;
 		uart_handle_cts_change(&uart->port, uart->scts);
 	}
@@ -504,7 +504,7 @@ static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id)
 	struct circ_buf *xmit = &uart->port.info->xmit;
 
 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
-	if (uart->scts && (!bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
+	if (uart->scts && !(bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
 		uart->scts = 0;
 		uart_handle_cts_change(&uart->port, uart->scts);
 	}
Acked-by on v1 1/1
#1 lore raw

Thanks.

Sonic

-----Original Message-----
From: Roel Kluin [mailto:[email protected]]
Sent: Friday, April 17, 2009 4:29 AM
To: Zhang, Sonic
Cc: Andrew Morton; lkml
Subject: [PATCH] bfin_5xx: misplaced parentheses

!' has a higher precedence than &', parentheses are misplaced.

---

drivers/serial/bfin_5xx.c index renamed from drivers/serial/bfin_5xx.c +0 -0

18ba812..d86123e 100644

drivers/serial/bfin_5xx.c +0 -0
@@ -166,7 +166,7 @@ static void bfin_serial_start_tx(struct uart_port

*port)
struct tty_struct *tty = uart->port.info->port.tty;

#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
- if (uart->scts &&
(!bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
+ if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) &
TIOCM_CTS)) {
uart->scts = 0; uart_handle_cts_change(&uart->port, uart->scts);
}
@@ -368,7 +368,7 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id)
struct bfin_serial_port *uart = dev_id;

#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
- if (uart->scts &&
(!bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
+ if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) &
TIOCM_CTS)) {
uart->scts = 0; uart_handle_cts_change(&uart->port, uart->scts);
}
@@ -504,7 +504,7 @@ static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id)
struct circ_buf *xmit = &uart->port.info->xmit;

#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
- if (uart->scts &&
(!bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
+ if (uart->scts &&
!(bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
uart->scts = 0; uart_handle_cts_change(&uart->port, uart->scts);
}