Skip to content

Commit 0783f17

Browse files
MarceloSpessotoalexdeucher
authored andcommitted
drm/amd/display: Fix hdcp_log.h codestyle
Place HDCP_EVENT_TRACE(hdcp, event) macro content inside do while loop to avoid if-else issues in hdcp_log.h file v2: fix up build (Alex) Signed-off-by: Marcelo Mendes Spessoto Junior <marcelomspessoto@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 31906f4 commit 0783f17

File tree

1 file changed

+6
-4
lines changed
  • drivers/gpu/drm/amd/display/modules/hdcp

1 file changed

+6
-4
lines changed

drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,12 @@
8686
#define HDCP_CPIRQ_TRACE(hdcp) \
8787
HDCP_LOG_FSM(hdcp, "[Link %d] --> CPIRQ", hdcp->config.index)
8888
#define HDCP_EVENT_TRACE(hdcp, event) \
89-
if (event == MOD_HDCP_EVENT_WATCHDOG_TIMEOUT) \
90-
HDCP_TIMEOUT_TRACE(hdcp); \
91-
else if (event == MOD_HDCP_EVENT_CPIRQ) \
92-
HDCP_CPIRQ_TRACE(hdcp)
89+
do { \
90+
if (event == MOD_HDCP_EVENT_WATCHDOG_TIMEOUT) \
91+
HDCP_TIMEOUT_TRACE(hdcp); \
92+
else if (event == MOD_HDCP_EVENT_CPIRQ) \
93+
HDCP_CPIRQ_TRACE(hdcp); \
94+
} while (0)
9395
/* TODO: find some way to tell if logging is off to save time */
9496
#define HDCP_DDC_READ_TRACE(hdcp, msg_name, msg, msg_size) do { \
9597
mod_hdcp_dump_binary_message(msg, msg_size, hdcp->buf, \

0 commit comments

Comments
 (0)