diff mbox series

ALSA: mixart_core: Mark expected switch fall-through

Message ID 20180808221148.GA1864@embeddedor.com (mailing list archive)
State New, archived
Headers show
Series ALSA: mixart_core: Mark expected switch fall-through | expand

Commit Message

Gustavo A. R. Silva Aug. 8, 2018, 10:11 p.m. UTC
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in this particular case, I replaced the code comment with
a proper "fall through" annotation, which is what GCC is expecting
to find.

Addresses-Coverity-ID: 114889 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 sound/pci/mixart/mixart_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai Aug. 9, 2018, 6:52 a.m. UTC | #1
On Thu, 09 Aug 2018 00:11:48 +0200,
 Gustavo A. R. Silva  wrote:
> 
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Notice that in this particular case, I replaced the code comment with
> a proper "fall through" annotation, which is what GCC is expecting
> to find.
> 
> Addresses-Coverity-ID: 114889 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Applied, thanks.


Takashi
diff mbox series

Patch

diff --git a/sound/pci/mixart/mixart_core.c b/sound/pci/mixart/mixart_core.c
index 46c292b..71776bf 100644
--- a/sound/pci/mixart/mixart_core.c
+++ b/sound/pci/mixart/mixart_core.c
@@ -540,7 +540,7 @@  irqreturn_t snd_mixart_threaded_irq(int irq, void *dev_id)
 				dev_err(&mgr->pci->dev,
 					"canceled notification %x !\n", msg);
 			}
-			/* no break, continue ! */
+			/* fall through */
 		case MSG_TYPE_ANSWER:
 			/* answer or notification to a message we are waiting for*/
 			mutex_lock(&mgr->msg_lock);