Commit 9525d69a authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by David S. Miller

net: plip: mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 114893
Addresses-Coverity-ID: 114894
Addresses-Coverity-ID: 114895
Addresses-Coverity-ID: 114896
Addresses-Coverity-ID: 114897
Addresses-Coverity-ID: 114898
Addresses-Coverity-ID: 114899
Addresses-Coverity-ID: 114900
Addresses-Coverity-ID: 114901
Addresses-Coverity-ID: 114902
Addresses-Coverity-ID: 114903
Addresses-Coverity-ID: 114904
Addresses-Coverity-ID: 114905
Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 35e00da3
...@@ -502,6 +502,7 @@ plip_receive(unsigned short nibble_timeout, struct net_device *dev, ...@@ -502,6 +502,7 @@ plip_receive(unsigned short nibble_timeout, struct net_device *dev,
*data_p = (c0 >> 3) & 0x0f; *data_p = (c0 >> 3) & 0x0f;
write_data (dev, 0x10); /* send ACK */ write_data (dev, 0x10); /* send ACK */
*ns_p = PLIP_NB_1; *ns_p = PLIP_NB_1;
/* fall through */
case PLIP_NB_1: case PLIP_NB_1:
cx = nibble_timeout; cx = nibble_timeout;
...@@ -597,6 +598,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl, ...@@ -597,6 +598,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl,
printk(KERN_DEBUG "%s: receive start\n", dev->name); printk(KERN_DEBUG "%s: receive start\n", dev->name);
rcv->state = PLIP_PK_LENGTH_LSB; rcv->state = PLIP_PK_LENGTH_LSB;
rcv->nibble = PLIP_NB_BEGIN; rcv->nibble = PLIP_NB_BEGIN;
/* fall through */
case PLIP_PK_LENGTH_LSB: case PLIP_PK_LENGTH_LSB:
if (snd->state != PLIP_PK_DONE) { if (snd->state != PLIP_PK_DONE) {
...@@ -617,6 +619,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl, ...@@ -617,6 +619,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl,
return TIMEOUT; return TIMEOUT;
} }
rcv->state = PLIP_PK_LENGTH_MSB; rcv->state = PLIP_PK_LENGTH_MSB;
/* fall through */
case PLIP_PK_LENGTH_MSB: case PLIP_PK_LENGTH_MSB:
if (plip_receive(nibble_timeout, dev, if (plip_receive(nibble_timeout, dev,
...@@ -639,6 +642,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl, ...@@ -639,6 +642,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl,
rcv->state = PLIP_PK_DATA; rcv->state = PLIP_PK_DATA;
rcv->byte = 0; rcv->byte = 0;
rcv->checksum = 0; rcv->checksum = 0;
/* fall through */
case PLIP_PK_DATA: case PLIP_PK_DATA:
lbuf = rcv->skb->data; lbuf = rcv->skb->data;
...@@ -651,6 +655,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl, ...@@ -651,6 +655,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl,
rcv->checksum += lbuf[--rcv->byte]; rcv->checksum += lbuf[--rcv->byte];
} while (rcv->byte); } while (rcv->byte);
rcv->state = PLIP_PK_CHECKSUM; rcv->state = PLIP_PK_CHECKSUM;
/* fall through */
case PLIP_PK_CHECKSUM: case PLIP_PK_CHECKSUM:
if (plip_receive(nibble_timeout, dev, if (plip_receive(nibble_timeout, dev,
...@@ -663,6 +668,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl, ...@@ -663,6 +668,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl,
return ERROR; return ERROR;
} }
rcv->state = PLIP_PK_DONE; rcv->state = PLIP_PK_DONE;
/* fall through */
case PLIP_PK_DONE: case PLIP_PK_DONE:
/* Inform the upper layer for the arrival of a packet. */ /* Inform the upper layer for the arrival of a packet. */
...@@ -708,6 +714,7 @@ plip_send(unsigned short nibble_timeout, struct net_device *dev, ...@@ -708,6 +714,7 @@ plip_send(unsigned short nibble_timeout, struct net_device *dev,
case PLIP_NB_BEGIN: case PLIP_NB_BEGIN:
write_data (dev, data & 0x0f); write_data (dev, data & 0x0f);
*ns_p = PLIP_NB_1; *ns_p = PLIP_NB_1;
/* fall through */
case PLIP_NB_1: case PLIP_NB_1:
write_data (dev, 0x10 | (data & 0x0f)); write_data (dev, 0x10 | (data & 0x0f));
...@@ -722,6 +729,7 @@ plip_send(unsigned short nibble_timeout, struct net_device *dev, ...@@ -722,6 +729,7 @@ plip_send(unsigned short nibble_timeout, struct net_device *dev,
} }
write_data (dev, 0x10 | (data >> 4)); write_data (dev, 0x10 | (data >> 4));
*ns_p = PLIP_NB_2; *ns_p = PLIP_NB_2;
/* fall through */
case PLIP_NB_2: case PLIP_NB_2:
write_data (dev, (data >> 4)); write_data (dev, (data >> 4));
...@@ -810,6 +818,7 @@ plip_send_packet(struct net_device *dev, struct net_local *nl, ...@@ -810,6 +818,7 @@ plip_send_packet(struct net_device *dev, struct net_local *nl,
&snd->nibble, snd->length.b.lsb)) &snd->nibble, snd->length.b.lsb))
return TIMEOUT; return TIMEOUT;
snd->state = PLIP_PK_LENGTH_MSB; snd->state = PLIP_PK_LENGTH_MSB;
/* fall through */
case PLIP_PK_LENGTH_MSB: case PLIP_PK_LENGTH_MSB:
if (plip_send(nibble_timeout, dev, if (plip_send(nibble_timeout, dev,
...@@ -818,6 +827,7 @@ plip_send_packet(struct net_device *dev, struct net_local *nl, ...@@ -818,6 +827,7 @@ plip_send_packet(struct net_device *dev, struct net_local *nl,
snd->state = PLIP_PK_DATA; snd->state = PLIP_PK_DATA;
snd->byte = 0; snd->byte = 0;
snd->checksum = 0; snd->checksum = 0;
/* fall through */
case PLIP_PK_DATA: case PLIP_PK_DATA:
do { do {
...@@ -829,6 +839,7 @@ plip_send_packet(struct net_device *dev, struct net_local *nl, ...@@ -829,6 +839,7 @@ plip_send_packet(struct net_device *dev, struct net_local *nl,
snd->checksum += lbuf[--snd->byte]; snd->checksum += lbuf[--snd->byte];
} while (snd->byte); } while (snd->byte);
snd->state = PLIP_PK_CHECKSUM; snd->state = PLIP_PK_CHECKSUM;
/* fall through */
case PLIP_PK_CHECKSUM: case PLIP_PK_CHECKSUM:
if (plip_send(nibble_timeout, dev, if (plip_send(nibble_timeout, dev,
...@@ -839,6 +850,7 @@ plip_send_packet(struct net_device *dev, struct net_local *nl, ...@@ -839,6 +850,7 @@ plip_send_packet(struct net_device *dev, struct net_local *nl,
dev_kfree_skb(snd->skb); dev_kfree_skb(snd->skb);
dev->stats.tx_packets++; dev->stats.tx_packets++;
snd->state = PLIP_PK_DONE; snd->state = PLIP_PK_DONE;
/* fall through */
case PLIP_PK_DONE: case PLIP_PK_DONE:
/* Close the connection */ /* Close the connection */
...@@ -927,6 +939,7 @@ plip_interrupt(void *dev_id) ...@@ -927,6 +939,7 @@ plip_interrupt(void *dev_id)
switch (nl->connection) { switch (nl->connection) {
case PLIP_CN_CLOSING: case PLIP_CN_CLOSING:
netif_wake_queue (dev); netif_wake_queue (dev);
/* fall through */
case PLIP_CN_NONE: case PLIP_CN_NONE:
case PLIP_CN_SEND: case PLIP_CN_SEND:
rcv->state = PLIP_PK_TRIGGER; rcv->state = PLIP_PK_TRIGGER;
......
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