Skip to contentSkip to conversation

staging: dgnc: fixed spaces before and after "|"

PATCH Julia Lawall 2 participants 2 messages Mar 13, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20160313052049.GA12145@spock

#1 lore raw
Quoted 20 lines · Juliana Rodrigues

This patch fixes the following issue while mantains 80 character per line limit by removing unnecessary parenthesis.

CHECK: spaces preferred around that '|' (ctx:VxV)
+ writeb((UART_FCR_ENABLE_FIFO|UART_FCR_CLEAR_RCVR|UART_FCR_CLEAR_XMIT),

---
Changes on v2:
- Removed file name from subject line

---
 drivers/staging/dgnc/dgnc_cls.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/dgnc/dgnc_cls.c +0 -0
index 51db98b..6e1e475 100644

drivers/staging/dgnc/dgnc_cls.c static void cls_uart_init(struct channel_t *ch) · line 1173

Quoted 8 lines
drivers/staging/dgnc/dgnc_cls.c +3 -2
@@ -1168,8 +1168,10 @@ static void cls_uart_init(struct channel_t *ch)
 	/* Clear out UART and FIFO */
 	readb(&ch->ch_cls_uart->txrx);
 
-	writeb((UART_FCR_ENABLE_FIFO|UART_FCR_CLEAR_RCVR|UART_FCR_CLEAR_XMIT),
-	       &ch->ch_cls_uart->isr_fcr);
+	writeb((UART_FCR_ENABLE_FIFO |
+		UART_FCR_CLEAR_RCVR  |
+		UART_FCR_CLEAR_XMIT),

So it couldn't fit on one line? Or not even on two lines?

drivers/staging/dgnc/dgnc_cls.c static void cls_uart_init(struct channel_t *ch) · line 1174

Quoted 1 line
drivers/staging/dgnc/dgnc_cls.c +1 -0
+		&ch->ch_cls_uart->isr_fcr);

This line should not have been affected by the patch. It has been indented by one more space to make it look like it is part of the | rather than an argument of writeb.

julia

Quoted 13 lines
drivers/staging/dgnc/dgnc_cls.c +0 -0
 	udelay(10);
 
 	ch->ch_flags |= (CH_FIFO_ENABLED | CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM);
Signature · 8 lines
2.7.2

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160313052049.GA12145%40spock.
For more options, visit https://groups.google.com/d/optout.
#2 lore raw

Em Dom, 2016-03-13 às 06:33 +0100, Julia Lawall escreveu:

Quoted 30 lines · Juliana Rodrigues
Quoted 7 lines

This patch fixes the following issue while mantains 80 character per line limit by removing unnecessary parenthesis.

CHECK: spaces preferred around that '|' (ctx:VxV) +

writeb((UART_FCR_ENABLE_FIFO|UART_FCR_CLEAR_RCVR|UART_FCR_CLEAR_XMIT) ,

Review

Quoted 10 lines

---
Changes on v2:
    - Removed file name from subject line
---
  drivers/staging/dgnc/dgnc_cls.c | 6 ++++--

  1 file changed, 4 insertions(+), 2 deletions(-)

(quoted diff) +0 -0

b/drivers/staging/dgnc/dgnc_cls.c

drivers/staging/dgnc/dgnc_cls.c static void cls_uart_init(struct channel_t

Quoted 4 lines

index 51db98b..6e1e475 100644

drivers/staging/dgnc/dgnc_cls.c +0 -0
@@ -1168,8 +1168,10 @@ static void cls_uart_init(struct channel_t

*ch)

Quoted 4 lines
drivers/staging/dgnc/dgnc_cls.c +0 -0
        /* Clear out UART and FIFO */
        readb(&ch->ch_cls_uart->txrx);

Quoted 8 lines

-     writeb((UART_FCR_ENABLE_FIFO|UART_FCR_CLEAR_RCVR|UART_FCR_CLEAR _XMIT),

Quoted 4 lines

-            &ch->ch_cls_uart->isr_fcr);
+     writeb((UART_FCR_ENABLE_FIFO |
+             UART_FCR_CLEAR_RCVR  |
+             UART_FCR_CLEAR_XMIT),

So it couldn't fit on one line?  Or not even on two lines?

Actually, I forgot to add the changes into this patch, sorry. I sent a new one to fix this.

Quoted 28 lines
Quoted 2 lines

+             &ch->ch_cls_uart->isr_fcr);

This line should not have been affected by the patch.  It has been indented by one more space to make it look like it is part of the | rather
than an argument of writeb.

julia

Quoted 3 lines

       udelay(10);

       ch->ch_flags |= (CH_FIFO_ENABLED | CH_TX_FIFO_EMPTY |

CH_TX_FIFO_LWM);

Quoted 5 lines

--
2.7.2

--
You received this message because you are subscribed to the Google

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it,

send an email to [email protected].

Quoted 1 line

To post to this group, send email to outreachy-kernel@googlegroups.

com.

Quoted 1 line

To view this discussion on the web visit https://groups.google.com/

d/msgid/outreachy-kernel/20160313052049.GA12145%40spock.

Quoted 2 lines

For more options, visit https://groups.google.com/d/optout.