From: Randy Dunlap Date: Mon, 9 Aug 2021 02:52:08 +0000 (-0700) Subject: drm/amd/display: use do-while-0 for DC_TRACE_LEVEL_MESSAGE() X-Git-Tag: libata-5.15-2021-09-05~42^2~5^2~55 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f59a66c1915e644c0f77de894dac0ce15f7edad4;p=linux-block.git drm/amd/display: use do-while-0 for DC_TRACE_LEVEL_MESSAGE() Building with W=1 complains about an empty 'else' statement, so use the usual do-nothing-while-0 loop to quieten this warning. ../drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:113:53: warning: suggest braces around empty body in an 'else' statement [-Wempty-body] 113 | *state, retry_count); Fixes: b30eda8d416c ("drm/amd/display: Add ETW log to dmub_psr_get_state") Signed-off-by: Randy Dunlap Cc: Wyatt Wood Cc: Alex Deucher Cc: Christian König Cc: "Pan, Xinhui" Cc: Harry Wentland Cc: Leo Li Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c index 1ca8b1d94bc2..aa8403bc4c83 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c @@ -29,7 +29,7 @@ #include "dmub/dmub_srv.h" #include "core_types.h" -#define DC_TRACE_LEVEL_MESSAGE(...) /* do nothing */ +#define DC_TRACE_LEVEL_MESSAGE(...) do {} while (0) /* do nothing */ #define MAX_PIPES 6