Skip to contentSkip to conversation

drm/amd/display: Fix codestyle issues for modules

PATCH Applied Marcelo Mendes Spessoto Junior 2 participants 15 messages Dec 29, 2023 – Jan 3, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover drm/amd/display: Fix codestyle issues for modules

This patchset aims to fix most of codestyle issues present in the modules directory

Marcelo Mendes Spessoto Junior (7):
Fix hdcp1_execution.c codestyle
Fix hdcp_psp.c codestyle
Fix freesync.c codestyle
Fix hdcp_psp.h codestyle
Fix hdcp2_execution.c codestyle
Fix hdcp_log.h codestyle
Fix power_helpers.c codestyle

 .../gpu/drm/amd/display/modules/freesync/freesync.c    |  4 ++--
 .../gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c |  4 ++--
 .../gpu/drm/amd/display/modules/hdcp/hdcp2_execution.c |  6 ++----
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h    | 10 ++++++----
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c    |  4 ++--
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.h    | 10 +++++-----
 .../gpu/drm/amd/display/modules/power/power_helpers.c  |  2 +-
 7 files changed, 20 insertions(+), 20 deletions(-)
Signature · 1 line
2.39.2
#1 lore raw

PATCH 1/7 drm/amd/display: Fix hdcp1_execution.c codestyle

Remove braces from single statement if expression in hdcp1_execution.c file

---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c +2 -2
index 1ddb4f5ea..182e7532d 100644
@@ -63,6 +63,7 @@ static inline enum mod_hdcp_status check_hdcp_capable_dp(struct mod_hdcp *hdcp)
 static inline enum mod_hdcp_status check_r0p_available_dp(struct mod_hdcp *hdcp)
 {
 	enum mod_hdcp_status status;
+
 	if (is_dp_hdcp(hdcp)) {
 		status = (hdcp->auth.msg.hdcp1.bstatus &
 				DP_BSTATUS_R0_PRIME_READY) ?
@@ -131,9 +132,8 @@ static inline uint8_t get_device_count(struct mod_hdcp *hdcp)
 static inline enum mod_hdcp_status check_device_count(struct mod_hdcp *hdcp)
 {
 	/* Avoid device count == 0 to do authentication */
-	if (0 == get_device_count(hdcp)) {
+	if (get_device_count(hdcp) == 0)
 		return MOD_HDCP_STATUS_HDCP1_DEVICE_COUNT_MISMATCH_FAILURE;
-	}
 
 	/* Some MST display may choose to report the internal panel as an HDCP RX.
 	 * To update this condition with 1(because the immediate repeater's internal
Signature · 1 line
2.39.2
Applied
#2 lore raw

Re: [PATCH 1/7] drm/amd/display: Fix hdcp1_execution.c codestyle

Applied. Thanks!

Quoted 35 lines · Marcelo Mendes Spessoto Junior

Remove braces from single statement if expression in hdcp1_execution.c file

---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c +2 -3
index 1ddb4f5ea..182e7532d 100644
@@ -63,6 +63,7 @@ static inline enum mod_hdcp_status check_hdcp_capable_dp(struct mod_hdcp *hdcp)
 static inline enum mod_hdcp_status check_r0p_available_dp(struct mod_hdcp *hdcp)
 {
        enum mod_hdcp_status status;
+
        if (is_dp_hdcp(hdcp)) {
                status = (hdcp->auth.msg.hdcp1.bstatus &
                                DP_BSTATUS_R0_PRIME_READY) ?
@@ -131,9 +132,8 @@ static inline uint8_t get_device_count(struct mod_hdcp *hdcp)
 static inline enum mod_hdcp_status check_device_count(struct mod_hdcp *hdcp)
 {
        /* Avoid device count == 0 to do authentication */
-       if (0 == get_device_count(hdcp)) {
+       if (get_device_count(hdcp) == 0)
                return MOD_HDCP_STATUS_HDCP1_DEVICE_COUNT_MISMATCH_FAILURE;
-       }
 
        /* Some MST display may choose to report the internal panel as an HDCP RX.
         * To update this condition with 1(because the immediate repeater's internal
--

2.39.2

#3 lore raw

PATCH 2/7 drm/amd/display: Fix hdcp_psp.c codestyle

In reply to Marcelo Mendes Spessoto Junior

Fix identation for hdcp_psp.c file

---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c +2 -2
index ee67a35c2..8c137d7c0 100644
@@ -443,7 +443,7 @@ enum mod_hdcp_status mod_hdcp_hdcp1_enable_dp_stream_encryption(struct mod_hdcp
 	for (i = 0; i < MAX_NUM_OF_DISPLAYS; i++) {
 
 		if (hdcp->displays[i].adjust.disable || hdcp->displays[i].state != MOD_HDCP_DISPLAY_ACTIVE)
-				continue;
+			continue;
 
 		memset(hdcp_cmd, 0, sizeof(struct ta_hdcp_shared_memory));
 
@@ -926,7 +926,7 @@ enum mod_hdcp_status mod_hdcp_hdcp2_enable_dp_stream_encryption(struct mod_hdcp
 
 	for (i = 0; i < MAX_NUM_OF_DISPLAYS; i++) {
 		if (hdcp->displays[i].adjust.disable || hdcp->displays[i].state != MOD_HDCP_DISPLAY_ACTIVE)
-				continue;
+			continue;
 
 		hdcp_cmd->in_msg.hdcp2_enable_dp_stream_encryption.display_handle = hdcp->displays[i].index;
 		hdcp_cmd->in_msg.hdcp2_enable_dp_stream_encryption.session_handle = hdcp->auth.id;
Signature · 1 line
2.39.2
Applied
#4 lore raw

Re: [PATCH 2/7] drm/amd/display: Fix hdcp_psp.c codestyle

Applied. Thanks!

Quoted 33 lines · Marcelo Mendes Spessoto Junior

Fix identation for hdcp_psp.c file

---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c +2 -3
index ee67a35c2..8c137d7c0 100644
@@ -443,7 +443,7 @@ enum mod_hdcp_status mod_hdcp_hdcp1_enable_dp_stream_encryption(struct mod_hdcp
        for (i = 0; i < MAX_NUM_OF_DISPLAYS; i++) {
 
                if (hdcp->displays[i].adjust.disable || hdcp->displays[i].state != MOD_HDCP_DISPLAY_ACTIVE)
-                               continue;
+                       continue;
 
                memset(hdcp_cmd, 0, sizeof(struct ta_hdcp_shared_memory));
 
@@ -926,7 +926,7 @@ enum mod_hdcp_status mod_hdcp_hdcp2_enable_dp_stream_encryption(struct mod_hdcp
 
        for (i = 0; i < MAX_NUM_OF_DISPLAYS; i++) {
                if (hdcp->displays[i].adjust.disable || hdcp->displays[i].state != MOD_HDCP_DISPLAY_ACTIVE)
-                               continue;
+                       continue;
 
                hdcp_cmd->in_msg.hdcp2_enable_dp_stream_encryption.display_handle = hdcp->displays[i].index;
                hdcp_cmd->in_msg.hdcp2_enable_dp_stream_encryption.session_handle = hdcp->auth.id;
--

2.39.2

#5 lore raw

PATCH 3/7 drm/amd/display: Fix freesync.c codestyle

In reply to Marcelo Mendes Spessoto Junior

Remove braces for single statement if expression for freesync.c file

---
 drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +2 -2
index 47296d155..3955b7e4b 100644
@@ -81,6 +81,7 @@ struct mod_freesync *mod_freesync_create(struct dc *dc)
 void mod_freesync_destroy(struct mod_freesync *mod_freesync)
 {
 	struct core_freesync *core_freesync = NULL;
+
 	if (mod_freesync == NULL)
 		return;
 	core_freesync = MOD_FREESYNC_TO_CORE(mod_freesync);
@@ -278,9 +279,8 @@ static void apply_below_the_range(struct core_freesync *core_freesync,
 		}
 	} else if (last_render_time_in_us > (max_render_time_in_us + in_out_vrr->btr.margin_in_us / 2)) {
 		/* Enter Below the Range */
-		if (!in_out_vrr->btr.btr_active) {
+		if (!in_out_vrr->btr.btr_active)
 			in_out_vrr->btr.btr_active = true;
-		}
 	}
 
 	/* BTR set to "not active" so disengage */
Signature · 1 line
2.39.2
Applied
#6 lore raw

Re: [PATCH 3/7] drm/amd/display: Fix freesync.c codestyle

Applied. Thanks!

Quoted 34 lines · Marcelo Mendes Spessoto Junior

Remove braces for single statement if expression for freesync.c file

---
 drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +2 -3
index 47296d155..3955b7e4b 100644
@@ -81,6 +81,7 @@ struct mod_freesync *mod_freesync_create(struct dc *dc)
 void mod_freesync_destroy(struct mod_freesync *mod_freesync)
 {
        struct core_freesync *core_freesync = NULL;
+
        if (mod_freesync == NULL)
                return;
        core_freesync = MOD_FREESYNC_TO_CORE(mod_freesync);
@@ -278,9 +279,8 @@ static void apply_below_the_range(struct core_freesync *core_freesync,
                }
        } else if (last_render_time_in_us > (max_render_time_in_us + in_out_vrr->btr.margin_in_us / 2)) {
                /* Enter Below the Range */
-               if (!in_out_vrr->btr.btr_active) {
+               if (!in_out_vrr->btr.btr_active)
                        in_out_vrr->btr.btr_active = true;
-               }
        }
 
        /* BTR set to "not active" so disengage */
--

2.39.2

#7 lore raw

PATCH 4/7 drm/amd/display: Fix hdcp_psp.h codestyle

In reply to Marcelo Mendes Spessoto Junior

Fix identation inside enum and place expressions in define macros inside () for hdcp_psp.h file

---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.h +5 -5
index 5b71bc96b..7844ea916 100644
@@ -98,9 +98,9 @@ enum ta_dtm_encoder_type {
  * This enum defines software value for dio_output_type
  */
 typedef enum {
-    TA_DTM_DIO_OUTPUT_TYPE__INVALID,
-    TA_DTM_DIO_OUTPUT_TYPE__DIRECT,
-    TA_DTM_DIO_OUTPUT_TYPE__DPIA
+	TA_DTM_DIO_OUTPUT_TYPE__INVALID,
+	TA_DTM_DIO_OUTPUT_TYPE__DIRECT,
+	TA_DTM_DIO_OUTPUT_TYPE__DPIA
 } ta_dtm_dio_output_type;
 
 struct ta_dtm_topology_update_input_v3 {
@@ -237,11 +237,11 @@ enum ta_hdcp2_hdcp2_msg_id_max_size {
 #define TA_HDCP__HDCP1_KSV_LIST_MAX_ENTRIES 127
 #define TA_HDCP__HDCP1_V_PRIME_SIZE 20
 #define TA_HDCP__HDCP2_TX_BUF_MAX_SIZE                                                                                 \
-	TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_NO_STORED_KM + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_STORED_KM + 6
+	(TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_NO_STORED_KM + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_STORED_KM + 6)
 
 // 64 bits boundaries
 #define TA_HDCP__HDCP2_RX_BUF_MAX_SIZE                                                                                 \
-	TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_CERT + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_RECEIVER_INFO + 4
+	(TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_CERT + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_RECEIVER_INFO + 4)
 
 enum ta_hdcp_status {
 	TA_HDCP_STATUS__SUCCESS = 0x00,
Signature · 1 line
2.39.2
Applied
#8 lore raw

Re: [PATCH 4/7] drm/amd/display: Fix hdcp_psp.h codestyle

Applied. Thanks!

Quoted 43 lines · Marcelo Mendes Spessoto Junior

Fix identation inside enum and place expressions in define macros inside () for hdcp_psp.h file

---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.h +5 -6
index 5b71bc96b..7844ea916 100644
@@ -98,9 +98,9 @@ enum ta_dtm_encoder_type {
  * This enum defines software value for dio_output_type
  */
 typedef enum {
-    TA_DTM_DIO_OUTPUT_TYPE__INVALID,
-    TA_DTM_DIO_OUTPUT_TYPE__DIRECT,
-    TA_DTM_DIO_OUTPUT_TYPE__DPIA
+       TA_DTM_DIO_OUTPUT_TYPE__INVALID,
+       TA_DTM_DIO_OUTPUT_TYPE__DIRECT,
+       TA_DTM_DIO_OUTPUT_TYPE__DPIA
 } ta_dtm_dio_output_type;
 
 struct ta_dtm_topology_update_input_v3 {
@@ -237,11 +237,11 @@ enum ta_hdcp2_hdcp2_msg_id_max_size {
 #define TA_HDCP__HDCP1_KSV_LIST_MAX_ENTRIES 127
 #define TA_HDCP__HDCP1_V_PRIME_SIZE 20
 #define TA_HDCP__HDCP2_TX_BUF_MAX_SIZE                                                                                 \
-       TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_NO_STORED_KM + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_STORED_KM + 6
+       (TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_NO_STORED_KM + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_STORED_KM + 6)
 
 // 64 bits boundaries
 #define TA_HDCP__HDCP2_RX_BUF_MAX_SIZE                                                                                 \
-       TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_CERT + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_RECEIVER_INFO + 4
+       (TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_CERT + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_RECEIVER_INFO + 4)
 
 enum ta_hdcp_status {
        TA_HDCP_STATUS__SUCCESS = 0x00,
--

2.39.2

#9 lore raw

PATCH 5/7 drm/amd/display: Fix hdcp2_execution.c codestyle

In reply to Marcelo Mendes Spessoto Junior

Remove braces for single statement if expressions and change comparison order for hdcp2_execution.c file

---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp2_execution.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp2_execution.c +2 -4
index 91c22b96e..733f22bed 100644
@@ -208,9 +208,8 @@ static inline uint8_t get_device_count(struct mod_hdcp *hdcp)
 static enum mod_hdcp_status check_device_count(struct mod_hdcp *hdcp)
 {
 	/* Avoid device count == 0 to do authentication */
-	if (0 == get_device_count(hdcp)) {
+	if (get_device_count(hdcp) == 0)
 		return MOD_HDCP_STATUS_HDCP1_DEVICE_COUNT_MISMATCH_FAILURE;
-	}
 
 	/* Some MST display may choose to report the internal panel as an HDCP RX.   */
 	/* To update this condition with 1(because the immediate repeater's internal */
@@ -689,9 +688,8 @@ static enum mod_hdcp_status validate_stream_ready(struct mod_hdcp *hdcp,
 	if (is_hdmi_dvi_sl_hdcp(hdcp)) {
 		if (!process_rxstatus(hdcp, event_ctx, input, &status))
 			goto out;
-		if (event_ctx->rx_id_list_ready) {
+		if (event_ctx->rx_id_list_ready)
 			goto out;
-		}
 	}
 	if (is_hdmi_dvi_sl_hdcp(hdcp))
 		if (!mod_hdcp_execute_and_set(check_stream_ready_available,
Signature · 1 line
2.39.2
Applied
#10 lore raw

Re: [PATCH 5/7] drm/amd/display: Fix hdcp2_execution.c codestyle

Applied. Thanks!

Quoted 38 lines · Marcelo Mendes Spessoto Junior

Remove braces for single statement if expressions and change comparison order for hdcp2_execution.c file

---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp2_execution.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp2_execution.c +2 -5
index 91c22b96e..733f22bed 100644
@@ -208,9 +208,8 @@ static inline uint8_t get_device_count(struct mod_hdcp *hdcp)
 static enum mod_hdcp_status check_device_count(struct mod_hdcp *hdcp)
 {
        /* Avoid device count == 0 to do authentication */
-       if (0 == get_device_count(hdcp)) {
+       if (get_device_count(hdcp) == 0)
                return MOD_HDCP_STATUS_HDCP1_DEVICE_COUNT_MISMATCH_FAILURE;
-       }
 
        /* Some MST display may choose to report the internal panel as an HDCP RX.   */
        /* To update this condition with 1(because the immediate repeater's internal */
@@ -689,9 +688,8 @@ static enum mod_hdcp_status validate_stream_ready(struct mod_hdcp *hdcp,
        if (is_hdmi_dvi_sl_hdcp(hdcp)) {
                if (!process_rxstatus(hdcp, event_ctx, input, &status))
                        goto out;
-               if (event_ctx->rx_id_list_ready) {
+               if (event_ctx->rx_id_list_ready)
                        goto out;
-               }
        }
        if (is_hdmi_dvi_sl_hdcp(hdcp))
                if (!mod_hdcp_execute_and_set(check_stream_ready_available,
--

2.39.2

#11 lore raw

PATCH 6/7 drm/amd/display: Fix hdcp_log.h codestyle

In reply to Marcelo Mendes Spessoto Junior

Place HDCP_EVENT_TRACE(hdcp, event) macro content inside do while loop to avoid if-else issues in hdcp_log.h file

---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h +6 -4
index c62df3bcc..55a2c5d4c 100644
@@ -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, \
Signature · 1 line
2.39.2
#12 lore raw

Re: [PATCH 6/7] drm/amd/display: Fix hdcp_log.h codestyle

Applied and added the missing semicolon. Thanks!

Alex

Quoted 33 lines · Marcelo Mendes Spessoto Junior

Place HDCP_EVENT_TRACE(hdcp, event) macro content inside do while loop to avoid if-else issues in hdcp_log.h file

---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h +6 -5
index c62df3bcc..55a2c5d4c 100644
@@ -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

#13 lore raw

PATCH 7/7 drm/amd/display: Fix power_helpers.c codestyle

In reply to Marcelo Mendes Spessoto Junior

Place define macro expression inside () in power_helpers.c file

---
 drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/power/power_helpers.c +1 -1
index 1675314a3..4e8af166e 100644
@@ -31,7 +31,7 @@
 
 #define DIV_ROUNDUP(a, b) (((a)+((b)/2))/(b))
 #define bswap16_based_on_endian(big_endian, value) \
-	(big_endian) ? cpu_to_be16(value) : cpu_to_le16(value)
+	((big_endian) ? cpu_to_be16(value) : cpu_to_le16(value))
 
 /* Possible Min Reduction config from least aggressive to most aggressive
  *  0    1     2     3     4     5     6     7     8     9     10    11   12
Signature · 1 line
2.39.2
Applied
#14 lore raw

Re: [PATCH 7/7] drm/amd/display: Fix power_helpers.c codestyle

Applied. Thanks!

Quoted 24 lines · Marcelo Mendes Spessoto Junior

Place define macro expression inside () in power_helpers.c file

---
 drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/power/power_helpers.c +1 -2
index 1675314a3..4e8af166e 100644
@@ -31,7 +31,7 @@
 
 #define DIV_ROUNDUP(a, b) (((a)+((b)/2))/(b))
 #define bswap16_based_on_endian(big_endian, value) \
-       (big_endian) ? cpu_to_be16(value) : cpu_to_le16(value)
+       ((big_endian) ? cpu_to_be16(value) : cpu_to_le16(value))
 
 /* Possible Min Reduction config from least aggressive to most aggressive
  *  0    1     2     3     4     5     6     7     8     9     10    11   12
--

2.39.2