diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2019-07-29 21:49:44 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-07-30 03:37:01 -0400 |
commit | 83554cb94515467cfff10f70ec858d60bbbab8ca (patch) | |
tree | a851338307f08d1db982f09ff8c3107cce1d3711 | |
parent | 8e774e023565c682c67617da5141c7395c8a5fac (diff) |
ALSA: sparc: Mark expected switch fall-throughs
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings (Building: sparc64):
sound/sparc/dbri.c: In function ‘reverse_bytes’:
sound/sparc/dbri.c:582:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
b = ((b & 0xffff0000) >> 16) | ((b & 0x0000ffff) << 16);
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/sparc/dbri.c:583:2: note: here
case 16:
^~~~
sound/sparc/dbri.c:584:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
b = ((b & 0xff00ff00) >> 8) | ((b & 0x00ff00ff) << 8);
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/sparc/dbri.c:585:2: note: here
case 8:
^~~~
sound/sparc/dbri.c:586:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
b = ((b & 0xf0f0f0f0) >> 4) | ((b & 0x0f0f0f0f) << 4);
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/sparc/dbri.c:587:2: note: here
case 4:
^~~~
sound/sparc/dbri.c:588:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
b = ((b & 0xcccccccc) >> 2) | ((b & 0x33333333) << 2);
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/sparc/dbri.c:589:2: note: here
case 2:
^~~~
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/sparc/dbri.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 010113156239..6e065d44060e 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c | |||
@@ -580,12 +580,16 @@ static __u32 reverse_bytes(__u32 b, int len) | |||
580 | switch (len) { | 580 | switch (len) { |
581 | case 32: | 581 | case 32: |
582 | b = ((b & 0xffff0000) >> 16) | ((b & 0x0000ffff) << 16); | 582 | b = ((b & 0xffff0000) >> 16) | ((b & 0x0000ffff) << 16); |
583 | /* fall through */ | ||
583 | case 16: | 584 | case 16: |
584 | b = ((b & 0xff00ff00) >> 8) | ((b & 0x00ff00ff) << 8); | 585 | b = ((b & 0xff00ff00) >> 8) | ((b & 0x00ff00ff) << 8); |
586 | /* fall through */ | ||
585 | case 8: | 587 | case 8: |
586 | b = ((b & 0xf0f0f0f0) >> 4) | ((b & 0x0f0f0f0f) << 4); | 588 | b = ((b & 0xf0f0f0f0) >> 4) | ((b & 0x0f0f0f0f) << 4); |
589 | /* fall through */ | ||
587 | case 4: | 590 | case 4: |
588 | b = ((b & 0xcccccccc) >> 2) | ((b & 0x33333333) << 2); | 591 | b = ((b & 0xcccccccc) >> 2) | ((b & 0x33333333) << 2); |
592 | /* fall through */ | ||
589 | case 2: | 593 | case 2: |
590 | b = ((b & 0xaaaaaaaa) >> 1) | ((b & 0x55555555) << 1); | 594 | b = ((b & 0xaaaaaaaa) >> 1) | ((b & 0x55555555) << 1); |
591 | case 1: | 595 | case 1: |