public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bfin_5xx: misplaced parentheses
@ 2009-04-16 20:29 Roel Kluin
  2009-04-20  7:13 ` Zhang, Sonic
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-04-16 20:29 UTC (permalink / raw)
  To: sonic.zhang; +Cc: Andrew Morton, lkml

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

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 18ba812..d86123e 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -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);
 	}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] bfin_5xx: misplaced parentheses
  2009-04-16 20:29 [PATCH] bfin_5xx: misplaced parentheses Roel Kluin
@ 2009-04-20  7:13 ` Zhang, Sonic
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Sonic @ 2009-04-20  7:13 UTC (permalink / raw)
  To: Roel Kluin; +Cc: Andrew Morton, lkml

Thanks.

Acked-by: Sonic Zhang <sonic.zhang@analog.com>


Sonic 

-----Original Message-----
From: Roel Kluin [mailto:roel.kluin@gmail.com] 
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.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index
18ba812..d86123e 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -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);
 	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-20  7:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16 20:29 [PATCH] bfin_5xx: misplaced parentheses Roel Kluin
2009-04-20  7:13 ` Zhang, Sonic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox