Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/dp: annotate implicit fall throughs

There is a plan to build the kernel with -Wimplicit-fallthrough and
these places in the code produced warnings (W=1). Fix them up.

This commit remove the following warnings:

include/linux/compiler.h:77:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
include/asm-generic/bug.h:134:2: note: in expansion of macro 'unlikely'
drivers/gpu/drm/drm_dp_helper.c:155:3: note: in expansion of macro 'WARN'
include/linux/compiler.h:77:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
include/asm-generic/bug.h:134:2: note: in expansion of macro 'unlikely'
drivers/gpu/drm/drm_dp_helper.c:173:3: note: in expansion of macro 'WARN'
drivers/gpu/drm/drm_dp_helper.c:547:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
Acked-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190114202748.15584-1-malat@debian.org

authored by

Mathieu Malaterre and committed by
Daniel Vetter
e9c0c874 2db8ebca

+3
+3
drivers/gpu/drm/drm_dp_helper.c
··· 154 154 default: 155 155 WARN(1, "unknown DP link rate %d, using %x\n", link_rate, 156 156 DP_LINK_BW_1_62); 157 + /* fall through */ 157 158 case 162000: 158 159 return DP_LINK_BW_1_62; 159 160 case 270000: ··· 172 171 switch (link_bw) { 173 172 default: 174 173 WARN(1, "unknown DP link BW code %x, using 162000\n", link_bw); 174 + /* fall through */ 175 175 case DP_LINK_BW_1_62: 176 176 return 162000; 177 177 case DP_LINK_BW_2_7: ··· 554 552 case DP_DS_16BPC: 555 553 return 16; 556 554 } 555 + /* fall through */ 557 556 default: 558 557 return 0; 559 558 }