drm/amd/display: Fix fall-through warning for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 16 Jun 2021 20:52:06 +0000 (15:52 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 18 Jun 2021 21:14:33 +0000 (17:14 -0400)
In preparation to enable -Wimplicit-fallthrough for Clang, fix
the following warning by replacing a /* fall through */ comment
with the new pseudo-keyword macro fallthrough:

rivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:672:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                        case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER:
                        ^

Notice that Clang doesn't recognize /* fall through */ comments as
implicit fall-through markings, so in order to globally enable
-Wimplicit-fallthrough for Clang, these comments need to be
replaced with fallthrough; in the whole codebase.

Link: https://github.com/KSPP/linux/issues/115
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c

index 28631714f697836aee1641d89e05c867dfdafe21..2fb88e54a4bf459d7dbed5e8a519c736b1779b1a 100644 (file)
@@ -668,7 +668,7 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
                                /* polling_timeout_period is in us */
                                defer_time_in_ms += aux110->polling_timeout_period / 1000;
                                ++aux_defer_retries;
-                               /* fall through */
+                               fallthrough;
                        case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER:
                                retry_on_defer = true;
                                fallthrough;