* [PATCH] drm/amd/display: remove redundant initialization of variable remainder
@ 2023-12-19 14:19 Colin Ian King
2023-12-19 19:21 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2023-12-19 14:19 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Xinhui.Pan, David Airlie, Daniel Vetter,
amd-gfx, dri-devel
Cc: kernel-janitors, linux-kernel
Variable remainder is being initialized with a value that is never read,
the assignment is redundant and can be removed. Also add a newline
after the declaration to clean up the coding style.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/gpu/drm/amd/display/dc/basics/conversion.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.c b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
index e295a839ab47..1090d235086a 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/conversion.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
@@ -103,7 +103,8 @@ void convert_float_matrix(
static uint32_t find_gcd(uint32_t a, uint32_t b)
{
- uint32_t remainder = 0;
+ uint32_t remainder;
+
while (b != 0) {
remainder = a % b;
a = b;
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd/display: remove redundant initialization of variable remainder
2023-12-19 14:19 [PATCH] drm/amd/display: remove redundant initialization of variable remainder Colin Ian King
@ 2023-12-19 19:21 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2023-12-19 19:21 UTC (permalink / raw)
To: Colin Ian King
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Xinhui.Pan, David Airlie, Daniel Vetter,
amd-gfx, dri-devel, kernel-janitors, linux-kernel
Applied. Thanks!
On Tue, Dec 19, 2023 at 12:40 PM Colin Ian King <colin.i.king@gmail.com> wrote:
>
> Variable remainder is being initialized with a value that is never read,
> the assignment is redundant and can be removed. Also add a newline
> after the declaration to clean up the coding style.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/gpu/drm/amd/display/dc/basics/conversion.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.c b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
> index e295a839ab47..1090d235086a 100644
> --- a/drivers/gpu/drm/amd/display/dc/basics/conversion.c
> +++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
> @@ -103,7 +103,8 @@ void convert_float_matrix(
>
> static uint32_t find_gcd(uint32_t a, uint32_t b)
> {
> - uint32_t remainder = 0;
> + uint32_t remainder;
> +
> while (b != 0) {
> remainder = a % b;
> a = b;
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-19 19:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19 14:19 [PATCH] drm/amd/display: remove redundant initialization of variable remainder Colin Ian King
2023-12-19 19:21 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®