Annotate switch-case fall through
Quiets warnings like: drivers/dahdi/dahdi-base.c:8494:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (chan->txstate != DAHDI_TXSTATE_OFFHOOK) break; ^ Needed since Linux 5.4 commit (a035d552a93bb9ef60487, "Makefile: Globally enable fall-33bb9f2a0dc857ff869through warning") [1] [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a035d552a93bb9ef6048733bb9f2a0dc857 Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
This commit is contained in:
parent
45ac6a30f9
commit
6e5197fed4
@ -7943,7 +7943,7 @@ static inline void __dahdi_process_getaudio_chunk(struct dahdi_chan *ss, unsigne
|
|||||||
memset(getlin, 0, DAHDI_CHUNKSIZE * sizeof(short));
|
memset(getlin, 0, DAHDI_CHUNKSIZE * sizeof(short));
|
||||||
txb[0] = DAHDI_LIN2X(0, ms);
|
txb[0] = DAHDI_LIN2X(0, ms);
|
||||||
memset(txb + 1, txb[0], DAHDI_CHUNKSIZE - 1);
|
memset(txb + 1, txb[0], DAHDI_CHUNKSIZE - 1);
|
||||||
/* fall through to normal conf mode */
|
/* fallthrough */
|
||||||
case DAHDI_CONF_CONF: /* Normal conference mode */
|
case DAHDI_CONF_CONF: /* Normal conference mode */
|
||||||
if (is_pseudo_chan(ms)) /* if pseudo-channel */
|
if (is_pseudo_chan(ms)) /* if pseudo-channel */
|
||||||
{
|
{
|
||||||
@ -8506,7 +8506,7 @@ static void __dahdi_hooksig_pvt(struct dahdi_chan *chan, enum dahdi_rxsig rxsig)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* fall through intentionally */
|
/* fallthrough */
|
||||||
case DAHDI_SIG_FXSGS: /* FXS Groundstart */
|
case DAHDI_SIG_FXSGS: /* FXS Groundstart */
|
||||||
if (rxsig == DAHDI_RXSIG_ONHOOK) {
|
if (rxsig == DAHDI_RXSIG_ONHOOK) {
|
||||||
chan->ringdebtimer = RING_DEBOUNCE_TIME;
|
chan->ringdebtimer = RING_DEBOUNCE_TIME;
|
||||||
@ -8525,7 +8525,7 @@ static void __dahdi_hooksig_pvt(struct dahdi_chan *chan, enum dahdi_rxsig rxsig)
|
|||||||
chan->gotgs = 1;
|
chan->gotgs = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* fall through intentionally */
|
/* fallthrough */
|
||||||
case DAHDI_SIG_FXOLS: /* FXO Loopstart */
|
case DAHDI_SIG_FXOLS: /* FXO Loopstart */
|
||||||
case DAHDI_SIG_FXOKS: /* FXO Kewlstart */
|
case DAHDI_SIG_FXOKS: /* FXO Kewlstart */
|
||||||
switch(rxsig) {
|
switch(rxsig) {
|
||||||
|
@ -1452,11 +1452,13 @@ wcaxx_check_battery_lost(struct wcaxx *wc, struct wcaxx_module *const mod)
|
|||||||
break;
|
break;
|
||||||
case BATTERY_UNKNOWN:
|
case BATTERY_UNKNOWN:
|
||||||
mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
|
mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
|
||||||
|
/* fallthrough */
|
||||||
case BATTERY_PRESENT:
|
case BATTERY_PRESENT:
|
||||||
fxo->battery_state = BATTERY_DEBOUNCING_LOST;
|
fxo->battery_state = BATTERY_DEBOUNCING_LOST;
|
||||||
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
||||||
break;
|
break;
|
||||||
case BATTERY_DEBOUNCING_LOST_FROM_PRESENT_ALARM:
|
case BATTERY_DEBOUNCING_LOST_FROM_PRESENT_ALARM:
|
||||||
|
/* fallthrough */
|
||||||
case BATTERY_DEBOUNCING_LOST: /* Intentional drop through */
|
case BATTERY_DEBOUNCING_LOST: /* Intentional drop through */
|
||||||
if (time_after(wc->framecount, fxo->battdebounce_timer)) {
|
if (time_after(wc->framecount, fxo->battdebounce_timer)) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
@ -1507,7 +1509,8 @@ wcaxx_check_battery_present(struct wcaxx *wc, struct wcaxx_module *const mod)
|
|||||||
|
|
||||||
switch (fxo->battery_state) {
|
switch (fxo->battery_state) {
|
||||||
case BATTERY_DEBOUNCING_PRESENT_FROM_LOST_ALARM:
|
case BATTERY_DEBOUNCING_PRESENT_FROM_LOST_ALARM:
|
||||||
case BATTERY_DEBOUNCING_PRESENT: /* intentional drop through */
|
/* fallthrough */
|
||||||
|
case BATTERY_DEBOUNCING_PRESENT:
|
||||||
if (time_after(wc->framecount, fxo->battdebounce_timer)) {
|
if (time_after(wc->framecount, fxo->battdebounce_timer)) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
dev_info(&wc->xb.pdev->dev,
|
dev_info(&wc->xb.pdev->dev,
|
||||||
@ -1560,7 +1563,8 @@ wcaxx_check_battery_present(struct wcaxx *wc, struct wcaxx_module *const mod)
|
|||||||
break;
|
break;
|
||||||
case BATTERY_UNKNOWN:
|
case BATTERY_UNKNOWN:
|
||||||
mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
|
mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
|
||||||
case BATTERY_LOST: /* intentional drop through */
|
/* fallthrough */
|
||||||
|
case BATTERY_LOST:
|
||||||
fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
|
fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
|
||||||
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
||||||
break;
|
break;
|
||||||
|
@ -1955,12 +1955,14 @@ wctdm_check_battery_lost(struct wctdm *wc, struct wctdm_module *const mod)
|
|||||||
break;
|
break;
|
||||||
case BATTERY_UNKNOWN:
|
case BATTERY_UNKNOWN:
|
||||||
mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
|
mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
|
||||||
|
/* fallthrough */
|
||||||
case BATTERY_PRESENT:
|
case BATTERY_PRESENT:
|
||||||
fxo->battery_state = BATTERY_DEBOUNCING_LOST;
|
fxo->battery_state = BATTERY_DEBOUNCING_LOST;
|
||||||
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
||||||
break;
|
break;
|
||||||
case BATTERY_DEBOUNCING_LOST_FROM_PRESENT_ALARM:
|
case BATTERY_DEBOUNCING_LOST_FROM_PRESENT_ALARM:
|
||||||
case BATTERY_DEBOUNCING_LOST: /* Intentional drop through */
|
/* fallthrough */
|
||||||
|
case BATTERY_DEBOUNCING_LOST:
|
||||||
if (time_after(wc->framecount, fxo->battdebounce_timer)) {
|
if (time_after(wc->framecount, fxo->battdebounce_timer)) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
dev_info(&wc->vb.pdev->dev,
|
dev_info(&wc->vb.pdev->dev,
|
||||||
@ -2063,7 +2065,8 @@ wctdm_check_battery_present(struct wctdm *wc, struct wctdm_module *const mod)
|
|||||||
break;
|
break;
|
||||||
case BATTERY_UNKNOWN:
|
case BATTERY_UNKNOWN:
|
||||||
mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
|
mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
|
||||||
case BATTERY_LOST: /* intentional drop through */
|
/* fallthrough */
|
||||||
|
case BATTERY_LOST:
|
||||||
fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
|
fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
|
||||||
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user