Commit fcb261f3 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

lapb: Reduce switch/case indent

Make the case labels the same indent as the switch.

git diff -w shows 80 column reflowing.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 207ec0ab
...@@ -62,8 +62,7 @@ static void lapb_state0_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -62,8 +62,7 @@ static void lapb_state0_machine(struct lapb_cb *lapb, struct sk_buff *skb,
lapb->dev, frame->pf); lapb->dev, frame->pf);
#endif #endif
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S0 -> S3\n", printk(KERN_DEBUG "lapb: (%p) S0 -> S3\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_send_control(lapb, LAPB_UA, frame->pf, lapb_send_control(lapb, LAPB_UA, frame->pf,
LAPB_RESPONSE); LAPB_RESPONSE);
...@@ -90,8 +89,7 @@ static void lapb_state0_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -90,8 +89,7 @@ static void lapb_state0_machine(struct lapb_cb *lapb, struct sk_buff *skb,
lapb->dev, frame->pf); lapb->dev, frame->pf);
#endif #endif
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S0 -> S3\n", printk(KERN_DEBUG "lapb: (%p) S0 -> S3\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_send_control(lapb, LAPB_UA, frame->pf, lapb_send_control(lapb, LAPB_UA, frame->pf,
LAPB_RESPONSE); LAPB_RESPONSE);
...@@ -121,8 +119,7 @@ static void lapb_state0_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -121,8 +119,7 @@ static void lapb_state0_machine(struct lapb_cb *lapb, struct sk_buff *skb,
printk(KERN_DEBUG "lapb: (%p) S0 TX UA(%d)\n", printk(KERN_DEBUG "lapb: (%p) S0 TX UA(%d)\n",
lapb->dev, frame->pf); lapb->dev, frame->pf);
#endif #endif
lapb_send_control(lapb, LAPB_UA, frame->pf, lapb_send_control(lapb, LAPB_UA, frame->pf, LAPB_RESPONSE);
LAPB_RESPONSE);
break; break;
default: default:
...@@ -191,8 +188,7 @@ static void lapb_state1_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -191,8 +188,7 @@ static void lapb_state1_machine(struct lapb_cb *lapb, struct sk_buff *skb,
printk(KERN_DEBUG "lapb: (%p) S1 TX DM(%d)\n", printk(KERN_DEBUG "lapb: (%p) S1 TX DM(%d)\n",
lapb->dev, frame->pf); lapb->dev, frame->pf);
#endif #endif
lapb_send_control(lapb, LAPB_DM, frame->pf, lapb_send_control(lapb, LAPB_DM, frame->pf, LAPB_RESPONSE);
LAPB_RESPONSE);
break; break;
case LAPB_UA: case LAPB_UA:
...@@ -202,8 +198,7 @@ static void lapb_state1_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -202,8 +198,7 @@ static void lapb_state1_machine(struct lapb_cb *lapb, struct sk_buff *skb,
#endif #endif
if (frame->pf) { if (frame->pf) {
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S1 -> S3\n", printk(KERN_DEBUG "lapb: (%p) S1 -> S3\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_stop_t1timer(lapb); lapb_stop_t1timer(lapb);
lapb_stop_t2timer(lapb); lapb_stop_t2timer(lapb);
...@@ -224,8 +219,7 @@ static void lapb_state1_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -224,8 +219,7 @@ static void lapb_state1_machine(struct lapb_cb *lapb, struct sk_buff *skb,
#endif #endif
if (frame->pf) { if (frame->pf) {
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S1 -> S0\n", printk(KERN_DEBUG "lapb: (%p) S1 -> S0\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_clear_queues(lapb); lapb_clear_queues(lapb);
lapb->state = LAPB_STATE_0; lapb->state = LAPB_STATE_0;
...@@ -255,8 +249,7 @@ static void lapb_state2_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -255,8 +249,7 @@ static void lapb_state2_machine(struct lapb_cb *lapb, struct sk_buff *skb,
printk(KERN_DEBUG "lapb: (%p) S2 TX DM(%d)\n", printk(KERN_DEBUG "lapb: (%p) S2 TX DM(%d)\n",
lapb->dev, frame->pf); lapb->dev, frame->pf);
#endif #endif
lapb_send_control(lapb, LAPB_DM, frame->pf, lapb_send_control(lapb, LAPB_DM, frame->pf, LAPB_RESPONSE);
LAPB_RESPONSE);
break; break;
case LAPB_DISC: case LAPB_DISC:
...@@ -266,8 +259,7 @@ static void lapb_state2_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -266,8 +259,7 @@ static void lapb_state2_machine(struct lapb_cb *lapb, struct sk_buff *skb,
printk(KERN_DEBUG "lapb: (%p) S2 TX UA(%d)\n", printk(KERN_DEBUG "lapb: (%p) S2 TX UA(%d)\n",
lapb->dev, frame->pf); lapb->dev, frame->pf);
#endif #endif
lapb_send_control(lapb, LAPB_UA, frame->pf, lapb_send_control(lapb, LAPB_UA, frame->pf, LAPB_RESPONSE);
LAPB_RESPONSE);
break; break;
case LAPB_UA: case LAPB_UA:
...@@ -277,8 +269,7 @@ static void lapb_state2_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -277,8 +269,7 @@ static void lapb_state2_machine(struct lapb_cb *lapb, struct sk_buff *skb,
#endif #endif
if (frame->pf) { if (frame->pf) {
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S2 -> S0\n", printk(KERN_DEBUG "lapb: (%p) S2 -> S0\n", lapb->dev);
lapb->dev);
#endif #endif
lapb->state = LAPB_STATE_0; lapb->state = LAPB_STATE_0;
lapb_start_t1timer(lapb); lapb_start_t1timer(lapb);
...@@ -294,14 +285,12 @@ static void lapb_state2_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -294,14 +285,12 @@ static void lapb_state2_machine(struct lapb_cb *lapb, struct sk_buff *skb,
#endif #endif
if (frame->pf) { if (frame->pf) {
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S2 -> S0\n", printk(KERN_DEBUG "lapb: (%p) S2 -> S0\n", lapb->dev);
lapb->dev);
#endif #endif
lapb->state = LAPB_STATE_0; lapb->state = LAPB_STATE_0;
lapb_start_t1timer(lapb); lapb_start_t1timer(lapb);
lapb_stop_t2timer(lapb); lapb_stop_t2timer(lapb);
lapb_disconnect_confirmation(lapb, lapb_disconnect_confirmation(lapb, LAPB_NOTCONNECTED);
LAPB_NOTCONNECTED);
} }
break; break;
...@@ -310,8 +299,8 @@ static void lapb_state2_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -310,8 +299,8 @@ static void lapb_state2_machine(struct lapb_cb *lapb, struct sk_buff *skb,
case LAPB_RNR: case LAPB_RNR:
case LAPB_RR: case LAPB_RR:
#if LAPB_DEBUG > 1 #if LAPB_DEBUG > 1
printk(KERN_DEBUG "lapb: (%p) S2 RX {I,REJ,RNR,RR}" printk(KERN_DEBUG "lapb: (%p) S2 RX {I,REJ,RNR,RR}(%d)\n",
"(%d)\n", lapb->dev, frame->pf); lapb->dev, frame->pf);
printk(KERN_DEBUG "lapb: (%p) S2 RX DM(%d)\n", printk(KERN_DEBUG "lapb: (%p) S2 RX DM(%d)\n",
lapb->dev, frame->pf); lapb->dev, frame->pf);
#endif #endif
...@@ -402,12 +391,10 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -402,12 +391,10 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb,
lapb->dev, frame->pf); lapb->dev, frame->pf);
#endif #endif
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S3 -> S0\n", printk(KERN_DEBUG "lapb: (%p) S3 -> S0\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_clear_queues(lapb); lapb_clear_queues(lapb);
lapb_send_control(lapb, LAPB_UA, frame->pf, lapb_send_control(lapb, LAPB_UA, frame->pf, LAPB_RESPONSE);
LAPB_RESPONSE);
lapb_start_t1timer(lapb); lapb_start_t1timer(lapb);
lapb_stop_t2timer(lapb); lapb_stop_t2timer(lapb);
lapb->state = LAPB_STATE_0; lapb->state = LAPB_STATE_0;
...@@ -420,8 +407,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -420,8 +407,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb,
lapb->dev, frame->pf); lapb->dev, frame->pf);
#endif #endif
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S3 -> S0\n", printk(KERN_DEBUG "lapb: (%p) S3 -> S0\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_clear_queues(lapb); lapb_clear_queues(lapb);
lapb->state = LAPB_STATE_0; lapb->state = LAPB_STATE_0;
...@@ -444,8 +430,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -444,8 +430,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb,
lapb->frmr_type = LAPB_FRMR_Z; lapb->frmr_type = LAPB_FRMR_Z;
lapb_transmit_frmr(lapb); lapb_transmit_frmr(lapb);
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S3 -> S4\n", printk(KERN_DEBUG "lapb: (%p) S3 -> S4\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_start_t1timer(lapb); lapb_start_t1timer(lapb);
lapb_stop_t2timer(lapb); lapb_stop_t2timer(lapb);
...@@ -468,8 +453,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -468,8 +453,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb,
lapb->frmr_type = LAPB_FRMR_Z; lapb->frmr_type = LAPB_FRMR_Z;
lapb_transmit_frmr(lapb); lapb_transmit_frmr(lapb);
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S3 -> S4\n", printk(KERN_DEBUG "lapb: (%p) S3 -> S4\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_start_t1timer(lapb); lapb_start_t1timer(lapb);
lapb_stop_t2timer(lapb); lapb_stop_t2timer(lapb);
...@@ -495,8 +479,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -495,8 +479,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb,
lapb->frmr_type = LAPB_FRMR_Z; lapb->frmr_type = LAPB_FRMR_Z;
lapb_transmit_frmr(lapb); lapb_transmit_frmr(lapb);
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S3 -> S4\n", printk(KERN_DEBUG "lapb: (%p) S3 -> S4\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_start_t1timer(lapb); lapb_start_t1timer(lapb);
lapb_stop_t2timer(lapb); lapb_stop_t2timer(lapb);
...@@ -515,8 +498,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -515,8 +498,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb,
lapb->frmr_type = LAPB_FRMR_Z; lapb->frmr_type = LAPB_FRMR_Z;
lapb_transmit_frmr(lapb); lapb_transmit_frmr(lapb);
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S3 -> S4\n", printk(KERN_DEBUG "lapb: (%p) S3 -> S4\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_start_t1timer(lapb); lapb_start_t1timer(lapb);
lapb_stop_t2timer(lapb); lapb_stop_t2timer(lapb);
...@@ -541,8 +523,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -541,8 +523,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb,
* a frame lost on the wire. * a frame lost on the wire.
*/ */
if (cn == NET_RX_DROP) { if (cn == NET_RX_DROP) {
printk(KERN_DEBUG printk(KERN_DEBUG "LAPB: rx congestion\n");
"LAPB: rx congestion\n");
break; break;
} }
lapb->vr = (lapb->vr + 1) % modulus; lapb->vr = (lapb->vr + 1) % modulus;
...@@ -567,8 +548,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -567,8 +548,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb,
lapb->dev, frame->pf, lapb->vr); lapb->dev, frame->pf, lapb->vr);
#endif #endif
lapb->condition |= LAPB_REJECT_CONDITION; lapb->condition |= LAPB_REJECT_CONDITION;
lapb_send_control(lapb, LAPB_REJ, lapb_send_control(lapb, LAPB_REJ, frame->pf,
frame->pf,
LAPB_RESPONSE); LAPB_RESPONSE);
lapb->condition &= ~LAPB_ACK_PENDING_CONDITION; lapb->condition &= ~LAPB_ACK_PENDING_CONDITION;
} }
...@@ -584,8 +564,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -584,8 +564,7 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb,
#endif #endif
lapb_establish_data_link(lapb); lapb_establish_data_link(lapb);
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S3 -> S1\n", printk(KERN_DEBUG "lapb: (%p) S3 -> S1\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_requeue_frames(lapb); lapb_requeue_frames(lapb);
lapb->state = LAPB_STATE_1; lapb->state = LAPB_STATE_1;
...@@ -639,8 +618,7 @@ static void lapb_state4_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -639,8 +618,7 @@ static void lapb_state4_machine(struct lapb_cb *lapb, struct sk_buff *skb,
lapb->dev, frame->pf); lapb->dev, frame->pf);
#endif #endif
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S4 -> S3\n", printk(KERN_DEBUG "lapb: (%p) S4 -> S3\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_send_control(lapb, LAPB_UA, frame->pf, lapb_send_control(lapb, LAPB_UA, frame->pf,
LAPB_RESPONSE); LAPB_RESPONSE);
...@@ -667,8 +645,7 @@ static void lapb_state4_machine(struct lapb_cb *lapb, struct sk_buff *skb, ...@@ -667,8 +645,7 @@ static void lapb_state4_machine(struct lapb_cb *lapb, struct sk_buff *skb,
lapb->dev, frame->pf); lapb->dev, frame->pf);
#endif #endif
#if LAPB_DEBUG > 0 #if LAPB_DEBUG > 0
printk(KERN_DEBUG "lapb: (%p) S4 -> S3\n", printk(KERN_DEBUG "lapb: (%p) S4 -> S3\n", lapb->dev);
lapb->dev);
#endif #endif
lapb_send_control(lapb, LAPB_UA, frame->pf, lapb_send_control(lapb, LAPB_UA, frame->pf,
LAPB_RESPONSE); LAPB_RESPONSE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment