[PATCH 6/7] drm/amd/display: Fix hdcp_log.h codestyle
Alex Deucher
alexdeucher at gmail.com
Wed Jan 3 14:39:25 UTC 2024
Applied and added the missing semicolon. Thanks!
Alex
On Fri, Dec 29, 2023 at 1:20 PM Marcelo Mendes Spessoto Junior
<marcelomspessoto at gmail.com> wrote:
>
> Place HDCP_EVENT_TRACE(hdcp, event) macro content inside do while loop
> to avoid if-else issues in hdcp_log.h file
>
> Signed-off-by: Marcelo Mendes Spessoto Junior <marcelomspessoto at gmail.com>
> ---
> drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h
> index c62df3bcc..55a2c5d4c 100644
> --- a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h
> +++ b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h
> @@ -86,10 +86,12 @@
> #define HDCP_CPIRQ_TRACE(hdcp) \
> HDCP_LOG_FSM(hdcp, "[Link %d] --> CPIRQ", hdcp->config.index)
> #define HDCP_EVENT_TRACE(hdcp, event) \
> - if (event == MOD_HDCP_EVENT_WATCHDOG_TIMEOUT) \
> - HDCP_TIMEOUT_TRACE(hdcp); \
> - else if (event == MOD_HDCP_EVENT_CPIRQ) \
> - HDCP_CPIRQ_TRACE(hdcp)
> + do { \
> + if (event == MOD_HDCP_EVENT_WATCHDOG_TIMEOUT) \
> + HDCP_TIMEOUT_TRACE(hdcp); \
> + else if (event == MOD_HDCP_EVENT_CPIRQ) \
> + HDCP_CPIRQ_TRACE(hdcp) \
> + } while (0)
> /* TODO: find some way to tell if logging is off to save time */
> #define HDCP_DDC_READ_TRACE(hdcp, msg_name, msg, msg_size) do { \
> mod_hdcp_dump_binary_message(msg, msg_size, hdcp->buf, \
> --
> 2.39.2
>
More information about the amd-gfx
mailing list