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

isdn: mark expected switch fall-throughs

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

Warning level 2 was used: -Wimplicit-fallthrough=2
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 03fc5d4f
...@@ -739,6 +739,7 @@ static void read_int_callback(struct urb *urb) ...@@ -739,6 +739,7 @@ static void read_int_callback(struct urb *urb)
case HD_OPEN_B2CHANNEL_ACK: case HD_OPEN_B2CHANNEL_ACK:
++channel; ++channel;
/* fall through */
case HD_OPEN_B1CHANNEL_ACK: case HD_OPEN_B1CHANNEL_ACK:
bcs = cs->bcs + channel; bcs = cs->bcs + channel;
update_basstate(ucs, BS_B1OPEN << channel, 0); update_basstate(ucs, BS_B1OPEN << channel, 0);
...@@ -752,6 +753,7 @@ static void read_int_callback(struct urb *urb) ...@@ -752,6 +753,7 @@ static void read_int_callback(struct urb *urb)
case HD_CLOSE_B2CHANNEL_ACK: case HD_CLOSE_B2CHANNEL_ACK:
++channel; ++channel;
/* fall through */
case HD_CLOSE_B1CHANNEL_ACK: case HD_CLOSE_B1CHANNEL_ACK:
bcs = cs->bcs + channel; bcs = cs->bcs + channel;
update_basstate(ucs, 0, BS_B1OPEN << channel); update_basstate(ucs, 0, BS_B1OPEN << channel);
...@@ -765,6 +767,7 @@ static void read_int_callback(struct urb *urb) ...@@ -765,6 +767,7 @@ static void read_int_callback(struct urb *urb)
case HD_B2_FLOW_CONTROL: case HD_B2_FLOW_CONTROL:
++channel; ++channel;
/* fall through */
case HD_B1_FLOW_CONTROL: case HD_B1_FLOW_CONTROL:
bcs = cs->bcs + channel; bcs = cs->bcs + channel;
atomic_add((l - BAS_NORMFRAME) * BAS_CORRFRAMES, atomic_add((l - BAS_NORMFRAME) * BAS_CORRFRAMES,
......
...@@ -361,6 +361,7 @@ modehdlc(struct bchannel *bch, int protocol) ...@@ -361,6 +361,7 @@ modehdlc(struct bchannel *bch, int protocol)
switch (protocol) { switch (protocol) {
case -1: /* used for init */ case -1: /* used for init */
bch->state = -1; bch->state = -1;
/* fall through */
case ISDN_P_NONE: case ISDN_P_NONE:
if (bch->state == ISDN_P_NONE) if (bch->state == ISDN_P_NONE)
break; break;
......
...@@ -1296,6 +1296,7 @@ mode_hfcpci(struct bchannel *bch, int bc, int protocol) ...@@ -1296,6 +1296,7 @@ mode_hfcpci(struct bchannel *bch, int bc, int protocol)
case (-1): /* used for init */ case (-1): /* used for init */
bch->state = -1; bch->state = -1;
bch->nr = bc; bch->nr = bc;
/* fall through */
case (ISDN_P_NONE): case (ISDN_P_NONE):
if (bch->state == ISDN_P_NONE) if (bch->state == ISDN_P_NONE)
return 0; return 0;
......
...@@ -887,6 +887,7 @@ release_card(struct inf_hw *card) { ...@@ -887,6 +887,7 @@ release_card(struct inf_hw *card) {
release_card(card->sc[i]); release_card(card->sc[i]);
card->sc[i] = NULL; card->sc[i] = NULL;
} }
/* fall through */
default: default:
pci_disable_device(card->pdev); pci_disable_device(card->pdev);
pci_set_drvdata(card->pdev, NULL); pci_set_drvdata(card->pdev, NULL);
......
...@@ -972,6 +972,7 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) { ...@@ -972,6 +972,7 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
break; break;
case PCTRL_CMD_FTM: case PCTRL_CMD_FTM:
p1 = 2; p1 = 2;
/* fall through */
case PCTRL_CMD_FTH: case PCTRL_CMD_FTH:
send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
PCTRL_CMD_SILON, 1, &p1); PCTRL_CMD_SILON, 1, &p1);
...@@ -1177,6 +1178,7 @@ setup_pump(struct isar_ch *ch) { ...@@ -1177,6 +1178,7 @@ setup_pump(struct isar_ch *ch) {
send_mbox(ch->is, dps | ISAR_HIS_PUMPCFG, send_mbox(ch->is, dps | ISAR_HIS_PUMPCFG,
PMOD_DTMF, 1, param); PMOD_DTMF, 1, param);
} }
/* fall through */
case ISDN_P_B_MODEM_ASYNC: case ISDN_P_B_MODEM_ASYNC:
ctrl = PMOD_DATAMODEM; ctrl = PMOD_DATAMODEM;
if (test_bit(FLG_ORIGIN, &ch->bch.Flags)) { if (test_bit(FLG_ORIGIN, &ch->bch.Flags)) {
...@@ -1268,6 +1270,7 @@ setup_iom2(struct isar_ch *ch) { ...@@ -1268,6 +1270,7 @@ setup_iom2(struct isar_ch *ch) {
case ISDN_P_B_MODEM_ASYNC: case ISDN_P_B_MODEM_ASYNC:
case ISDN_P_B_T30_FAX: case ISDN_P_B_T30_FAX:
cmsb |= IOM_CTRL_RCV; cmsb |= IOM_CTRL_RCV;
/* fall through */
case ISDN_P_B_L2DTMF: case ISDN_P_B_L2DTMF:
if (test_bit(FLG_DTMFSEND, &ch->bch.Flags)) if (test_bit(FLG_DTMFSEND, &ch->bch.Flags))
cmsb |= IOM_CTRL_RCV; cmsb |= IOM_CTRL_RCV;
...@@ -1560,6 +1563,7 @@ isar_l2l1(struct mISDNchannel *ch, struct sk_buff *skb) ...@@ -1560,6 +1563,7 @@ isar_l2l1(struct mISDNchannel *ch, struct sk_buff *skb)
ich->is->name, hh->id); ich->is->name, hh->id);
ret = -EINVAL; ret = -EINVAL;
} }
/* fall through */
default: default:
pr_info("%s: %s unknown prim(%x,%x)\n", pr_info("%s: %s unknown prim(%x,%x)\n",
ich->is->name, __func__, hh->prim, hh->id); ich->is->name, __func__, hh->prim, hh->id);
......
...@@ -207,6 +207,7 @@ modehdlc(struct BCState *bcs, int mode, int bc) ...@@ -207,6 +207,7 @@ modehdlc(struct BCState *bcs, int mode, int bc)
bcs->mode = 1; bcs->mode = 1;
bcs->channel = bc; bcs->channel = bc;
bc = 0; bc = 0;
/* fall through */
case (L1_MODE_NULL): case (L1_MODE_NULL):
if (bcs->mode == L1_MODE_NULL) if (bcs->mode == L1_MODE_NULL)
return; return;
......
...@@ -1369,6 +1369,7 @@ leased_l1l2(struct PStack *st, int pr, void *arg) ...@@ -1369,6 +1369,7 @@ leased_l1l2(struct PStack *st, int pr, void *arg)
case (PH_ACTIVATE | INDICATION): case (PH_ACTIVATE | INDICATION):
case (PH_ACTIVATE | CONFIRM): case (PH_ACTIVATE | CONFIRM):
event = EV_LEASED; event = EV_LEASED;
/* fall through */
case (PH_DEACTIVATE | INDICATION): case (PH_DEACTIVATE | INDICATION):
case (PH_DEACTIVATE | CONFIRM): case (PH_DEACTIVATE | CONFIRM):
if (test_bit(FLG_TWO_DCHAN, &chanp->cs->HW_Flags)) if (test_bit(FLG_TWO_DCHAN, &chanp->cs->HW_Flags))
......
...@@ -1843,6 +1843,7 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg) ...@@ -1843,6 +1843,7 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg)
case PH_DEACTIVATE | REQUEST: case PH_DEACTIVATE | REQUEST:
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag); test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
skb_queue_purge(&bcs->squeue); skb_queue_purge(&bcs->squeue);
/* fall through */
default: default:
B_L2L1(b_if, pr, arg); B_L2L1(b_if, pr, arg);
break; break;
......
...@@ -108,6 +108,7 @@ ReadISAC(struct IsdnCardState *cs, u_char offset) ...@@ -108,6 +108,7 @@ ReadISAC(struct IsdnCardState *cs, u_char offset)
switch (cs->subtyp) { switch (cs->subtyp) {
case R647: case R647:
off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf)); off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf));
/* fall through */
case R685: case R685:
return (readreg(cs->hw.gazel.isac, off2)); return (readreg(cs->hw.gazel.isac, off2));
case R753: case R753:
...@@ -125,6 +126,7 @@ WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value) ...@@ -125,6 +126,7 @@ WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
switch (cs->subtyp) { switch (cs->subtyp) {
case R647: case R647:
off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf)); off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf));
/* fall through */
case R685: case R685:
writereg(cs->hw.gazel.isac, off2, value); writereg(cs->hw.gazel.isac, off2, value);
break; break;
...@@ -203,6 +205,7 @@ ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset) ...@@ -203,6 +205,7 @@ ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
switch (cs->subtyp) { switch (cs->subtyp) {
case R647: case R647:
off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf)); off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf));
/* fall through */
case R685: case R685:
return (readreg(cs->hw.gazel.hscx[hscx], off2)); return (readreg(cs->hw.gazel.hscx[hscx], off2));
case R753: case R753:
...@@ -220,6 +223,7 @@ WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value) ...@@ -220,6 +223,7 @@ WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
switch (cs->subtyp) { switch (cs->subtyp) {
case R647: case R647:
off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf)); off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf));
/* fall through */
case R685: case R685:
writereg(cs->hw.gazel.hscx[hscx], off2, value); writereg(cs->hw.gazel.hscx[hscx], off2, value);
break; break;
......
...@@ -1089,6 +1089,7 @@ isar_pump_statev_fax(struct BCState *bcs, u_char devt) { ...@@ -1089,6 +1089,7 @@ isar_pump_statev_fax(struct BCState *bcs, u_char devt) {
break; break;
case PCTRL_CMD_FTM: case PCTRL_CMD_FTM:
p1 = 2; p1 = 2;
/* fall through */
case PCTRL_CMD_FTH: case PCTRL_CMD_FTH:
sendmsg(cs, dps | ISAR_HIS_PUMPCTRL, sendmsg(cs, dps | ISAR_HIS_PUMPCTRL,
PCTRL_CMD_SILON, 1, &p1); PCTRL_CMD_SILON, 1, &p1);
...@@ -1097,6 +1098,7 @@ isar_pump_statev_fax(struct BCState *bcs, u_char devt) { ...@@ -1097,6 +1098,7 @@ isar_pump_statev_fax(struct BCState *bcs, u_char devt) {
case PCTRL_CMD_FRM: case PCTRL_CMD_FRM:
if (frm_extra_delay) if (frm_extra_delay)
mdelay(frm_extra_delay); mdelay(frm_extra_delay);
/* fall through */
case PCTRL_CMD_FRH: case PCTRL_CMD_FRH:
p1 = bcs->hw.isar.mod = bcs->hw.isar.newmod; p1 = bcs->hw.isar.mod = bcs->hw.isar.newmod;
bcs->hw.isar.newmod = 0; bcs->hw.isar.newmod = 0;
......
...@@ -88,6 +88,7 @@ l3_1tr6_setup_req(struct l3_process *pc, u_char pr, void *arg) ...@@ -88,6 +88,7 @@ l3_1tr6_setup_req(struct l3_process *pc, u_char pr, void *arg)
break; break;
case 'C': case 'C':
channel = 0x08; channel = 0x08;
/* fall through */
case 'P': case 'P':
channel |= 0x80; channel |= 0x80;
teln++; teln++;
......
...@@ -1282,6 +1282,7 @@ l3dss1_setup_req(struct l3_process *pc, u_char pr, ...@@ -1282,6 +1282,7 @@ l3dss1_setup_req(struct l3_process *pc, u_char pr,
switch (0x5f & *teln) { switch (0x5f & *teln) {
case 'C': case 'C':
channel = 0x08; channel = 0x08;
/* fall through */
case 'P': case 'P':
channel |= 0x80; channel |= 0x80;
teln++; teln++;
......
...@@ -99,6 +99,7 @@ pof_handle_data(hysdn_card *card, int datlen) ...@@ -99,6 +99,7 @@ pof_handle_data(hysdn_card *card, int datlen)
case TAG_CBOOTDTA: case TAG_CBOOTDTA:
DecryptBuf(boot, datlen); /* we need to encrypt the buffer */ DecryptBuf(boot, datlen); /* we need to encrypt the buffer */
/* fall through */
case TAG_BOOTDTA: case TAG_BOOTDTA:
if (card->debug_flags & LOG_POF_RECORD) if (card->debug_flags & LOG_POF_RECORD)
hysdn_addlog(card, "POF got %s len=%d offs=0x%lx", hysdn_addlog(card, "POF got %s len=%d offs=0x%lx",
...@@ -137,6 +138,7 @@ pof_handle_data(hysdn_card *card, int datlen) ...@@ -137,6 +138,7 @@ pof_handle_data(hysdn_card *card, int datlen)
case TAG_CABSDATA: case TAG_CABSDATA:
DecryptBuf(boot, datlen); /* we need to encrypt the buffer */ DecryptBuf(boot, datlen); /* we need to encrypt the buffer */
/* fall through */
case TAG_ABSDATA: case TAG_ABSDATA:
if (card->debug_flags & LOG_POF_RECORD) if (card->debug_flags & LOG_POF_RECORD)
hysdn_addlog(card, "POF got %s len=%d offs=0x%lx", hysdn_addlog(card, "POF got %s len=%d offs=0x%lx",
......
...@@ -354,6 +354,7 @@ EncodeMatrix(unsigned char *buf, int len, unsigned char *m, int mlen) ...@@ -354,6 +354,7 @@ EncodeMatrix(unsigned char *buf, int len, unsigned char *m, int mlen)
printk(KERN_WARNING "isdn_v110 (EncodeMatrix): buffer full!\n"); printk(KERN_WARNING "isdn_v110 (EncodeMatrix): buffer full!\n");
return line; return line;
} }
/* else: fall through */
case 128: case 128:
m[line] = 128; /* leftmost -> set byte to 1000000 */ m[line] = 128; /* leftmost -> set byte to 1000000 */
mbit = 64; /* current bit in the matrix line */ mbit = 64; /* current bit in the matrix line */
...@@ -386,20 +387,28 @@ EncodeMatrix(unsigned char *buf, int len, unsigned char *m, int mlen) ...@@ -386,20 +387,28 @@ EncodeMatrix(unsigned char *buf, int len, unsigned char *m, int mlen)
switch (++line % 10) { switch (++line % 10) {
case 1: case 1:
m[line++] = 0xfe; m[line++] = 0xfe;
/* fall through */
case 2: case 2:
m[line++] = 0xfe; m[line++] = 0xfe;
/* fall through */
case 3: case 3:
m[line++] = 0xfe; m[line++] = 0xfe;
/* fall through */
case 4: case 4:
m[line++] = 0xfe; m[line++] = 0xfe;
/* fall through */
case 5: case 5:
m[line++] = 0xbf; m[line++] = 0xbf;
/* fall through */
case 6: case 6:
m[line++] = 0xfe; m[line++] = 0xfe;
/* fall through */
case 7: case 7:
m[line++] = 0xfe; m[line++] = 0xfe;
/* fall through */
case 8: case 8:
m[line++] = 0xfe; m[line++] = 0xfe;
/* fall through */
case 9: case 9:
m[line++] = 0xfe; m[line++] = 0xfe;
} }
......
...@@ -539,6 +539,7 @@ create_l2entity(struct mISDNdevice *dev, struct mISDNchannel *ch, ...@@ -539,6 +539,7 @@ create_l2entity(struct mISDNdevice *dev, struct mISDNchannel *ch,
rq.protocol = ISDN_P_NT_S0; rq.protocol = ISDN_P_NT_S0;
if (dev->Dprotocols & (1 << ISDN_P_NT_E1)) if (dev->Dprotocols & (1 << ISDN_P_NT_E1))
rq.protocol = ISDN_P_NT_E1; rq.protocol = ISDN_P_NT_E1;
/* fall through */
case ISDN_P_LAPD_TE: case ISDN_P_LAPD_TE:
ch->recv = mISDN_queue_message; ch->recv = mISDN_queue_message;
ch->peer = &dev->D.st->own; ch->peer = &dev->D.st->own;
......
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