Skip to content

Commit d287c50

Browse files
GustavoARSilvadavem330
authored andcommitted
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: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 03fc5d4 commit d287c50

File tree

15 files changed

+33
-0
lines changed

15 files changed

+33
-0
lines changed

drivers/isdn/gigaset/bas-gigaset.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,7 @@ static void read_int_callback(struct urb *urb)
739739

740740
case HD_OPEN_B2CHANNEL_ACK:
741741
++channel;
742+
/* fall through */
742743
case HD_OPEN_B1CHANNEL_ACK:
743744
bcs = cs->bcs + channel;
744745
update_basstate(ucs, BS_B1OPEN << channel, 0);
@@ -752,6 +753,7 @@ static void read_int_callback(struct urb *urb)
752753

753754
case HD_CLOSE_B2CHANNEL_ACK:
754755
++channel;
756+
/* fall through */
755757
case HD_CLOSE_B1CHANNEL_ACK:
756758
bcs = cs->bcs + channel;
757759
update_basstate(ucs, 0, BS_B1OPEN << channel);
@@ -765,6 +767,7 @@ static void read_int_callback(struct urb *urb)
765767

766768
case HD_B2_FLOW_CONTROL:
767769
++channel;
770+
/* fall through */
768771
case HD_B1_FLOW_CONTROL:
769772
bcs = cs->bcs + channel;
770773
atomic_add((l - BAS_NORMFRAME) * BAS_CORRFRAMES,

drivers/isdn/hardware/mISDN/avmfritz.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ modehdlc(struct bchannel *bch, int protocol)
361361
switch (protocol) {
362362
case -1: /* used for init */
363363
bch->state = -1;
364+
/* fall through */
364365
case ISDN_P_NONE:
365366
if (bch->state == ISDN_P_NONE)
366367
break;

drivers/isdn/hardware/mISDN/hfcpci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,7 @@ mode_hfcpci(struct bchannel *bch, int bc, int protocol)
12961296
case (-1): /* used for init */
12971297
bch->state = -1;
12981298
bch->nr = bc;
1299+
/* fall through */
12991300
case (ISDN_P_NONE):
13001301
if (bch->state == ISDN_P_NONE)
13011302
return 0;

drivers/isdn/hardware/mISDN/mISDNinfineon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,7 @@ release_card(struct inf_hw *card) {
887887
release_card(card->sc[i]);
888888
card->sc[i] = NULL;
889889
}
890+
/* fall through */
890891
default:
891892
pci_disable_device(card->pdev);
892893
pci_set_drvdata(card->pdev, NULL);

drivers/isdn/hardware/mISDN/mISDNisar.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,7 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
972972
break;
973973
case PCTRL_CMD_FTM:
974974
p1 = 2;
975+
/* fall through */
975976
case PCTRL_CMD_FTH:
976977
send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
977978
PCTRL_CMD_SILON, 1, &p1);
@@ -1177,6 +1178,7 @@ setup_pump(struct isar_ch *ch) {
11771178
send_mbox(ch->is, dps | ISAR_HIS_PUMPCFG,
11781179
PMOD_DTMF, 1, param);
11791180
}
1181+
/* fall through */
11801182
case ISDN_P_B_MODEM_ASYNC:
11811183
ctrl = PMOD_DATAMODEM;
11821184
if (test_bit(FLG_ORIGIN, &ch->bch.Flags)) {
@@ -1268,6 +1270,7 @@ setup_iom2(struct isar_ch *ch) {
12681270
case ISDN_P_B_MODEM_ASYNC:
12691271
case ISDN_P_B_T30_FAX:
12701272
cmsb |= IOM_CTRL_RCV;
1273+
/* fall through */
12711274
case ISDN_P_B_L2DTMF:
12721275
if (test_bit(FLG_DTMFSEND, &ch->bch.Flags))
12731276
cmsb |= IOM_CTRL_RCV;
@@ -1560,6 +1563,7 @@ isar_l2l1(struct mISDNchannel *ch, struct sk_buff *skb)
15601563
ich->is->name, hh->id);
15611564
ret = -EINVAL;
15621565
}
1566+
/* fall through */
15631567
default:
15641568
pr_info("%s: %s unknown prim(%x,%x)\n",
15651569
ich->is->name, __func__, hh->prim, hh->id);

drivers/isdn/hisax/avm_pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ modehdlc(struct BCState *bcs, int mode, int bc)
207207
bcs->mode = 1;
208208
bcs->channel = bc;
209209
bc = 0;
210+
/* fall through */
210211
case (L1_MODE_NULL):
211212
if (bcs->mode == L1_MODE_NULL)
212213
return;

drivers/isdn/hisax/callc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,7 @@ leased_l1l2(struct PStack *st, int pr, void *arg)
13691369
case (PH_ACTIVATE | INDICATION):
13701370
case (PH_ACTIVATE | CONFIRM):
13711371
event = EV_LEASED;
1372+
/* fall through */
13721373
case (PH_DEACTIVATE | INDICATION):
13731374
case (PH_DEACTIVATE | CONFIRM):
13741375
if (test_bit(FLG_TWO_DCHAN, &chanp->cs->HW_Flags))

drivers/isdn/hisax/config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,6 +1843,7 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg)
18431843
case PH_DEACTIVATE | REQUEST:
18441844
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
18451845
skb_queue_purge(&bcs->squeue);
1846+
/* fall through */
18461847
default:
18471848
B_L2L1(b_if, pr, arg);
18481849
break;

drivers/isdn/hisax/gazel.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ ReadISAC(struct IsdnCardState *cs, u_char offset)
108108
switch (cs->subtyp) {
109109
case R647:
110110
off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf));
111+
/* fall through */
111112
case R685:
112113
return (readreg(cs->hw.gazel.isac, off2));
113114
case R753:
@@ -125,6 +126,7 @@ WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
125126
switch (cs->subtyp) {
126127
case R647:
127128
off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf));
129+
/* fall through */
128130
case R685:
129131
writereg(cs->hw.gazel.isac, off2, value);
130132
break;
@@ -203,6 +205,7 @@ ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
203205
switch (cs->subtyp) {
204206
case R647:
205207
off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf));
208+
/* fall through */
206209
case R685:
207210
return (readreg(cs->hw.gazel.hscx[hscx], off2));
208211
case R753:
@@ -220,6 +223,7 @@ WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
220223
switch (cs->subtyp) {
221224
case R647:
222225
off2 = ((off2 << 8 & 0xf000) | (off2 & 0xf));
226+
/* fall through */
223227
case R685:
224228
writereg(cs->hw.gazel.hscx[hscx], off2, value);
225229
break;

drivers/isdn/hisax/isar.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,7 @@ isar_pump_statev_fax(struct BCState *bcs, u_char devt) {
10891089
break;
10901090
case PCTRL_CMD_FTM:
10911091
p1 = 2;
1092+
/* fall through */
10921093
case PCTRL_CMD_FTH:
10931094
sendmsg(cs, dps | ISAR_HIS_PUMPCTRL,
10941095
PCTRL_CMD_SILON, 1, &p1);
@@ -1097,6 +1098,7 @@ isar_pump_statev_fax(struct BCState *bcs, u_char devt) {
10971098
case PCTRL_CMD_FRM:
10981099
if (frm_extra_delay)
10991100
mdelay(frm_extra_delay);
1101+
/* fall through */
11001102
case PCTRL_CMD_FRH:
11011103
p1 = bcs->hw.isar.mod = bcs->hw.isar.newmod;
11021104
bcs->hw.isar.newmod = 0;

drivers/isdn/hisax/l3_1tr6.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ l3_1tr6_setup_req(struct l3_process *pc, u_char pr, void *arg)
8888
break;
8989
case 'C':
9090
channel = 0x08;
91+
/* fall through */
9192
case 'P':
9293
channel |= 0x80;
9394
teln++;

drivers/isdn/hisax/l3dss1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,6 +1282,7 @@ l3dss1_setup_req(struct l3_process *pc, u_char pr,
12821282
switch (0x5f & *teln) {
12831283
case 'C':
12841284
channel = 0x08;
1285+
/* fall through */
12851286
case 'P':
12861287
channel |= 0x80;
12871288
teln++;

drivers/isdn/hysdn/hysdn_boot.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ pof_handle_data(hysdn_card *card, int datlen)
9999

100100
case TAG_CBOOTDTA:
101101
DecryptBuf(boot, datlen); /* we need to encrypt the buffer */
102+
/* fall through */
102103
case TAG_BOOTDTA:
103104
if (card->debug_flags & LOG_POF_RECORD)
104105
hysdn_addlog(card, "POF got %s len=%d offs=0x%lx",
@@ -137,6 +138,7 @@ pof_handle_data(hysdn_card *card, int datlen)
137138

138139
case TAG_CABSDATA:
139140
DecryptBuf(boot, datlen); /* we need to encrypt the buffer */
141+
/* fall through */
140142
case TAG_ABSDATA:
141143
if (card->debug_flags & LOG_POF_RECORD)
142144
hysdn_addlog(card, "POF got %s len=%d offs=0x%lx",

drivers/isdn/i4l/isdn_v110.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ EncodeMatrix(unsigned char *buf, int len, unsigned char *m, int mlen)
354354
printk(KERN_WARNING "isdn_v110 (EncodeMatrix): buffer full!\n");
355355
return line;
356356
}
357+
/* else: fall through */
357358
case 128:
358359
m[line] = 128; /* leftmost -> set byte to 1000000 */
359360
mbit = 64; /* current bit in the matrix line */
@@ -386,20 +387,28 @@ EncodeMatrix(unsigned char *buf, int len, unsigned char *m, int mlen)
386387
switch (++line % 10) {
387388
case 1:
388389
m[line++] = 0xfe;
390+
/* fall through */
389391
case 2:
390392
m[line++] = 0xfe;
393+
/* fall through */
391394
case 3:
392395
m[line++] = 0xfe;
396+
/* fall through */
393397
case 4:
394398
m[line++] = 0xfe;
399+
/* fall through */
395400
case 5:
396401
m[line++] = 0xbf;
402+
/* fall through */
397403
case 6:
398404
m[line++] = 0xfe;
405+
/* fall through */
399406
case 7:
400407
m[line++] = 0xfe;
408+
/* fall through */
401409
case 8:
402410
m[line++] = 0xfe;
411+
/* fall through */
403412
case 9:
404413
m[line++] = 0xfe;
405414
}

drivers/isdn/mISDN/stack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ create_l2entity(struct mISDNdevice *dev, struct mISDNchannel *ch,
539539
rq.protocol = ISDN_P_NT_S0;
540540
if (dev->Dprotocols & (1 << ISDN_P_NT_E1))
541541
rq.protocol = ISDN_P_NT_E1;
542+
/* fall through */
542543
case ISDN_P_LAPD_TE:
543544
ch->recv = mISDN_queue_message;
544545
ch->peer = &dev->D.st->own;

0 commit comments

Comments
 (0)