dahdi-linux: bump to latest git head
[feed/telephony.git] / libs / dahdi-linux / patches / 200-dahdi-use-fallthrough-where-needed.patch
1 From f9bc391e1cd830c830b3b4fb5fd46a59b41de373 Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Fri, 12 May 2023 20:18:13 +0200
4 Subject: [PATCH 1/6] dahdi: use fallthrough where needed
5
6 Use fallthrough instead of comment to fix compilation warning.
7
8 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
9 ---
10 drivers/dahdi/dahdi-base.c | 14 +++++++-------
11 drivers/dahdi/wcaxx-base.c | 2 ++
12 drivers/dahdi/wctdm24xxp/base.c | 2 ++
13 drivers/dahdi/xpp/card_global.c | 2 +-
14 4 files changed, 12 insertions(+), 8 deletions(-)
15
16 --- a/drivers/dahdi/dahdi-base.c
17 +++ b/drivers/dahdi/dahdi-base.c
18 @@ -7930,7 +7930,7 @@ static inline void __dahdi_process_getau
19 memset(getlin, 0, DAHDI_CHUNKSIZE * sizeof(short));
20 txb[0] = DAHDI_LIN2X(0, ms);
21 memset(txb + 1, txb[0], DAHDI_CHUNKSIZE - 1);
22 - /* fallthrough */
23 + fallthrough;
24 case DAHDI_CONF_CONF: /* Normal conference mode */
25 if (is_pseudo_chan(ms)) /* if pseudo-channel */
26 {
27 @@ -7954,7 +7954,7 @@ static inline void __dahdi_process_getau
28 memset(txb + 1, txb[0], DAHDI_CHUNKSIZE - 1);
29 break;
30 }
31 - /* fall through */
32 + fallthrough;
33 case DAHDI_CONF_CONFMON: /* Conference monitor mode */
34 if (ms->confmode & DAHDI_CONF_LISTENER) {
35 /* Subtract out last sample written to conf */
36 @@ -8493,7 +8493,7 @@ static void __dahdi_hooksig_pvt(struct d
37 break;
38 }
39 #endif
40 - /* fallthrough */
41 + fallthrough;
42 case DAHDI_SIG_FXSGS: /* FXS Groundstart */
43 if (rxsig == DAHDI_RXSIG_ONHOOK) {
44 chan->ringdebtimer = RING_DEBOUNCE_TIME;
45 @@ -8512,7 +8512,7 @@ static void __dahdi_hooksig_pvt(struct d
46 chan->gotgs = 1;
47 }
48 }
49 - /* fallthrough */
50 + fallthrough;
51 case DAHDI_SIG_FXOLS: /* FXO Loopstart */
52 case DAHDI_SIG_FXOKS: /* FXO Kewlstart */
53 switch(rxsig) {
54 @@ -8612,7 +8612,7 @@ void dahdi_rbsbits(struct dahdi_chan *ch
55 __dahdi_hooksig_pvt(chan, DAHDI_RXSIG_START);
56 break;
57 }
58 - /* Fall through */
59 + fallthrough;
60 case DAHDI_SIG_EM_E1:
61 case DAHDI_SIG_FXOLS: /* FXO Loopstart */
62 case DAHDI_SIG_FXOKS: /* FXO Kewlstart */
63 @@ -8630,7 +8630,7 @@ void dahdi_rbsbits(struct dahdi_chan *ch
64 break;
65 case DAHDI_SIG_FXSKS: /* FXS Kewlstart */
66 case DAHDI_SIG_FXSGS: /* FXS Groundstart */
67 - /* Fall through */
68 + fallthrough;
69 case DAHDI_SIG_FXSLS:
70 if (!(cursig & DAHDI_BBIT)) {
71 /* Check for ringing first */
72 @@ -9059,7 +9059,7 @@ static inline void __dahdi_process_putau
73 memcpy(ss->putlin, putlin, DAHDI_CHUNKSIZE * sizeof(short));
74 break;
75 }
76 - /* fall through */
77 + fallthrough;
78 case DAHDI_CONF_CONFANN: /* Conference with announce */
79 if (ms->confmode & DAHDI_CONF_TALKER) {
80 /* Store temp value */
81 --- a/drivers/dahdi/wcaxx-base.c
82 +++ b/drivers/dahdi/wcaxx-base.c
83 @@ -1456,7 +1456,7 @@ wcaxx_check_battery_lost(struct wcaxx *w
84 break;
85 case BATTERY_UNKNOWN:
86 mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
87 - /* fallthrough */
88 + fallthrough;
89 case BATTERY_PRESENT:
90 fxo->battery_state = BATTERY_DEBOUNCING_LOST;
91 fxo->battdebounce_timer = wc->framecount + battdebounce;
92 @@ -1567,7 +1567,7 @@ wcaxx_check_battery_present(struct wcaxx
93 break;
94 case BATTERY_UNKNOWN:
95 mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
96 - /* fallthrough */
97 + fallthrough;
98 case BATTERY_LOST:
99 fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
100 fxo->battdebounce_timer = wc->framecount + battdebounce;
101 --- a/drivers/dahdi/wctdm24xxp/base.c
102 +++ b/drivers/dahdi/wctdm24xxp/base.c
103 @@ -1964,7 +1964,7 @@ wctdm_check_battery_lost(struct wctdm *w
104 break;
105 case BATTERY_UNKNOWN:
106 mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
107 - /* fallthrough */
108 + fallthrough;
109 case BATTERY_PRESENT:
110 fxo->battery_state = BATTERY_DEBOUNCING_LOST;
111 fxo->battdebounce_timer = wc->framecount + battdebounce;
112 @@ -2074,7 +2074,7 @@ wctdm_check_battery_present(struct wctdm
113 break;
114 case BATTERY_UNKNOWN:
115 mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
116 - /* fallthrough */
117 + fallthrough;
118 case BATTERY_LOST:
119 fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
120 fxo->battdebounce_timer = wc->framecount + battdebounce;
121 --- a/drivers/dahdi/xpp/card_global.c
122 +++ b/drivers/dahdi/xpp/card_global.c
123 @@ -148,7 +148,7 @@ static int execute_chip_command(xpd_t *x
124 XPD_NOTICE(xpd,
125 "'I' is deprecated in register commands. "
126 "Use 'S' instead.\n");
127 - /* fall through */
128 + fallthrough;
129 case 'S':
130 do_subreg = 1;
131 num_args += 2; /* register + subreg */