drm/i915/intel_sdvo: mark expected switch fall-throughs
Subsystems (2)
PATCH 1/1 drm/i915/intel_sdvo: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Addresses-Coverity-ID: 141432
Addresses-Coverity-ID: 141433
Addresses-Coverity-ID: 141434
Addresses-Coverity-ID: 141435
Addresses-Coverity-ID: 141436
--- drivers/gpu/drm/i915/intel_sdvo.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_sdvo.c +6 -5
@@ -1327,6 +1327,7 @@ static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder,switch (crtc_state->pixel_multiplier) {default :WARN (1 ,"unknown pixel multiplier specified\n" ); +/* fall through */ case 1 : rate =SDVO_CLOCK_RATE_MULT_1X ;break ;case 2 : rate =SDVO_CLOCK_RATE_MULT_2X ;break ;case 4 : rate =SDVO_CLOCK_RATE_MULT_4X ;break ;
@@ -2274,15 +2275,15 @@ intel_sdvo_guess_ddc_bus(struct intel_sdvo *sdvo)*/ switch (sdvo->controlled_output) {case SDVO_OUTPUT_LVDS1 : - mask |=SDVO_OUTPUT_LVDS1 ; + mask |=SDVO_OUTPUT_LVDS1 ;/* fall through */ case SDVO_OUTPUT_LVDS0 : - mask |=SDVO_OUTPUT_LVDS0 ; + mask |=SDVO_OUTPUT_LVDS0 ;/* fall through */ case SDVO_OUTPUT_TMDS1 : - mask |=SDVO_OUTPUT_TMDS1 ; + mask |=SDVO_OUTPUT_TMDS1 ;/* fall through */ case SDVO_OUTPUT_TMDS0 : - mask |=SDVO_OUTPUT_TMDS0 ; + mask |=SDVO_OUTPUT_TMDS0 ;/* fall through */ case SDVO_OUTPUT_RGB1 : - mask |=SDVO_OUTPUT_RGB1 ; + mask |=SDVO_OUTPUT_RGB1 ;/* fall through */ case SDVO_OUTPUT_RGB0 : mask |=SDVO_OUTPUT_RGB0 ;break ;
Signature · 1 line
2.7.4
Quoted 9 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Addresses-Coverity-ID: 141432
Addresses-Coverity-ID: 141433
Addresses-Coverity-ID: 141434
Addresses-Coverity-ID: 141435
Addresses-Coverity-ID: 141436Signed-off-by Gustavo A. R. Silva <[email protected]>
Quoted 37 lines
--- drivers/gpu/drm/i915/intel_sdvo.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_sdvo.c +6
-5@@ -1327,6 +1327,7 @@ static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder,switch (crtc_state->pixel_multiplier) {default :WARN (1 ,"unknown pixel multiplier specified\n" ); +/* fall through */ case 1 : rate =SDVO_CLOCK_RATE_MULT_1X ;break ;case 2 : rate =SDVO_CLOCK_RATE_MULT_2X ;break ;case 4 : rate =SDVO_CLOCK_RATE_MULT_4X ;break ;@@ -2274,15 +2275,15 @@ intel_sdvo_guess_ddc_bus(struct intel_sdvo *sdvo)*/ switch (sdvo->controlled_output) {case SDVO_OUTPUT_LVDS1 : - mask |=SDVO_OUTPUT_LVDS1 ; + mask |=SDVO_OUTPUT_LVDS1 ;/* fall through */ case SDVO_OUTPUT_LVDS0 : - mask |=SDVO_OUTPUT_LVDS0 ; + mask |=SDVO_OUTPUT_LVDS0 ;/* fall through */ case SDVO_OUTPUT_TMDS1 : - mask |=SDVO_OUTPUT_TMDS1 ; + mask |=SDVO_OUTPUT_TMDS1 ;/* fall through */ case SDVO_OUTPUT_TMDS0 : - mask |=SDVO_OUTPUT_TMDS0 ; + mask |=SDVO_OUTPUT_TMDS0 ;/* fall through */ case SDVO_OUTPUT_RGB1 : - mask |=SDVO_OUTPUT_RGB1 ; + mask |=SDVO_OUTPUT_RGB1 ;/* fall through */ case SDVO_OUTPUT_RGB0 : mask |=SDVO_OUTPUT_RGB0 ;break ;
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Jani Nikula
maintainerQuoted 4 lines · Jani Nikula
Quoted 3 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Quoted 8 lines
Quoted 6 lines
Addresses-Coverity-ID: 141432
Addresses-Coverity-ID: 141433
Addresses-Coverity-ID: 141434
Addresses-Coverity-ID: 141435
Addresses-Coverity-ID: 141436Signed-off-by Gustavo A. R. Silva <[email protected]>Acked-by Jani Nikula <[email protected]>
More explicitly, the patch looks good, but I'll give others the chance to chime in before merging. In particular Chris has been doing plenty of warning fixes lately.
BR,
Jani.
Quoted 38 lines
Quoted 38 lines
--- drivers/gpu/drm/i915/intel_sdvo.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_sdvo.c +6
-5@@ -1327,6 +1327,7 @@ static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder,switch (crtc_state->pixel_multiplier) {default :WARN (1 ,"unknown pixel multiplier specified\n" ); +/* fall through */ case 1 : rate =SDVO_CLOCK_RATE_MULT_1X ;break ;case 2 : rate =SDVO_CLOCK_RATE_MULT_2X ;break ;case 4 : rate =SDVO_CLOCK_RATE_MULT_4X ;break ;@@ -2274,15 +2275,15 @@ intel_sdvo_guess_ddc_bus(struct intel_sdvo *sdvo)*/ switch (sdvo->controlled_output) {case SDVO_OUTPUT_LVDS1 : - mask |=SDVO_OUTPUT_LVDS1 ; + mask |=SDVO_OUTPUT_LVDS1 ;/* fall through */ case SDVO_OUTPUT_LVDS0 : - mask |=SDVO_OUTPUT_LVDS0 ; + mask |=SDVO_OUTPUT_LVDS0 ;/* fall through */ case SDVO_OUTPUT_TMDS1 : - mask |=SDVO_OUTPUT_TMDS1 ; + mask |=SDVO_OUTPUT_TMDS1 ;/* fall through */ case SDVO_OUTPUT_TMDS0 : - mask |=SDVO_OUTPUT_TMDS0 ; + mask |=SDVO_OUTPUT_TMDS0 ;/* fall through */ case SDVO_OUTPUT_RGB1 : - mask |=SDVO_OUTPUT_RGB1 ; + mask |=SDVO_OUTPUT_RGB1 ;/* fall through */ case SDVO_OUTPUT_RGB0 : mask |=SDVO_OUTPUT_RGB0 ;break ;
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center