summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/modules/hdcp
diff options
context:
space:
mode:
authorMarcelo Mendes Spessoto Junior <marcelomspessoto@gmail.com>2023-12-29 20:41:55 +0300
committerAlex Deucher <alexander.deucher@amd.com>2024-01-06 00:10:44 +0300
commit0783f17e760d3cfa6b79aea94712dc7082d4ae2c (patch)
tree6c67d629c4594ffaaf81a3f4a39655a695b4ac0b /drivers/gpu/drm/amd/display/modules/hdcp
parent31906f4cf6b1ece08f7a16c6c53ef899f1fda009 (diff)
downloadlinux-0783f17e760d3cfa6b79aea94712dc7082d4ae2c.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules/hdcp')
-rw-r--r--drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h10
1 files 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 c62df3bcc7cb..1d83c1b9da10 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, \