Skip to contentSkip to conversation

drm/amd/display: Clean up errors in color_gamma.c

PATCH Applied Ran Sun 2 participants 2 messages Aug 2, 2023 – Aug 7, 2023

Subsystems (3)
lore
Share & tools
lore

Ran Sun

author
#0 lore raw

PATCH 1/1 drm/amd/display: Clean up errors in color_gamma.c

Fix the following errors reported by checkpatch:

ERROR: trailing whitespace
ERROR: else should follow close brace '}'

---
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/modules/color/color_gamma.c +2 -3
index 67a062af3ab0..ff8e5708735d 100644
@@ -359,7 +359,7 @@ static struct fixed31_32 translate_from_linear_space(
 		scratch_1 = dc_fixpt_add(one, args->a3);
 		/* In the first region (first 16 points) and in the
 		 * region delimited by START/END we calculate with
-		 * full precision to avoid error accumulation. 
+		 * full precision to avoid error accumulation.
 		 */
 		if ((cal_buffer->buffer_index >= PRECISE_LUT_REGION_START &&
 			cal_buffer->buffer_index <= PRECISE_LUT_REGION_END) ||
@@ -379,8 +379,7 @@ static struct fixed31_32 translate_from_linear_space(
 		scratch_1 = dc_fixpt_sub(scratch_1, args->a2);
 
 		return scratch_1;
-	}
-	else
+	} else
 		return dc_fixpt_mul(args->arg, args->a1);
 }
 
Signature · 1 line
2.17.1
Applied
#1 lore raw

Applied. Thanks!

Quoted 37 lines · Ran Sun

Fix the following errors reported by checkpatch:

ERROR: trailing whitespace
ERROR: else should follow close brace '}'

---
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/modules/color/color_gamma.c +2 -4
index 67a062af3ab0..ff8e5708735d 100644
@@ -359,7 +359,7 @@ static struct fixed31_32 translate_from_linear_space(
                scratch_1 = dc_fixpt_add(one, args->a3);
                /* In the first region (first 16 points) and in the
                 * region delimited by START/END we calculate with
-                * full precision to avoid error accumulation.
+                * full precision to avoid error accumulation.
                 */
                if ((cal_buffer->buffer_index >= PRECISE_LUT_REGION_START &&
                        cal_buffer->buffer_index <= PRECISE_LUT_REGION_END) ||
@@ -379,8 +379,7 @@ static struct fixed31_32 translate_from_linear_space(
                scratch_1 = dc_fixpt_sub(scratch_1, args->a2);
 
                return scratch_1;
-       }
-       else
+       } else
                return dc_fixpt_mul(args->arg, args->a1);
 }
 
--

2.17.1