Skip to content

Commit e008227

Browse files
GustavoARSilvasre
authored andcommitted
HSI: ssi_protocol: Mark expected switch fall-throughs
Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: arm): drivers/hsi/clients/ssi_protocol.c: In function ‘ssip_set_rxstate’: drivers/hsi/clients/ssi_protocol.c:291:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (atomic_read(&ssi->tx_usecnt)) ^ drivers/hsi/clients/ssi_protocol.c:294:2: note: here case RECEIVING: ^~~~ drivers/hsi/clients/ssi_protocol.c: In function ‘ssip_keep_alive’: drivers/hsi/clients/ssi_protocol.c:466:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (atomic_read(&ssi->tx_usecnt) == 0) ^ drivers/hsi/clients/ssi_protocol.c:472:3: note: here case SEND_IDLE: ^~~~ Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 5f9e832 commit e008227

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/hsi/clients/ssi_protocol.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static void ssip_set_rxstate(struct ssi_protocol *ssi, unsigned int state)
290290
/* CMT speech workaround */
291291
if (atomic_read(&ssi->tx_usecnt))
292292
break;
293-
/* Otherwise fall through */
293+
/* Else, fall through */
294294
case RECEIVING:
295295
mod_timer(&ssi->keep_alive, jiffies +
296296
msecs_to_jiffies(SSIP_KATOUT));
@@ -465,9 +465,10 @@ static void ssip_keep_alive(struct timer_list *t)
465465
case SEND_READY:
466466
if (atomic_read(&ssi->tx_usecnt) == 0)
467467
break;
468+
/* Fall through */
468469
/*
469-
* Fall through. Workaround for cmt-speech
470-
* in that case we relay on audio timers.
470+
* Workaround for cmt-speech in that case
471+
* we relay on audio timers.
471472
*/
472473
case SEND_IDLE:
473474
spin_unlock(&ssi->lock);

0 commit comments

Comments
 (0)