drm/amd/display: Fix fall-through warning for Clang
Subsystems (3)
PATCH 1/1 drm/amd/display: Fix fall-through warning for Clang
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.
---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 15 in linux-next. This is one of those last remaining warnings.
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c +1 -1
@@ -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;
Signature · 1 line
2.27.0
Quoted 8 lines · Gustavo A. R. Silva
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: ^
Quoted 7 lines
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.
Harry
Quoted 22 lines
---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 15 in linux-next. This is one of those last remaining warnings.drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/dce/dce_aux.c +1
-1@@ -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;
Alex Deucher
AppliedApplied. Thanks!
Alex
Quoted 32 lines · Harry Wentland
Quoted 8 lines · Gustavo A. R. Silva
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: ^Quoted 7 lines
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.
Reviewed-by Harry Wentland <[email protected]>Harry
Quoted 8 lines
---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 15 in linux-next. This is one of those last remaining warnings.drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
Quoted 6 lines
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c +0
-0drivers/gpu/drm/amd/display/dc/dce/dce_aux.c bool dce_aux_transfer_with_retries(struct ddc_service *ddc, · line 674
Quoted 8 lines
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c +1
-1@@ -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;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx