lkml.org 
[lkml]   [2019]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] drm/radeon: remove assignment for return value
Date
On 2019-10-19 3:32 a.m., Wambui Karuga wrote:
> Remove unnecessary assignment for return value and have the
> function return the required value directly.
> Issue found by coccinelle:
> @@
> local idexpression ret;
> expression e;
> @@
>
> -ret =
> +return
> e;
> -return ret;
>
> Signed-off-by: Wambui Karuga <wambui@karuga.xyz>

Thanks for your patch.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry


> ---
> drivers/gpu/drm/radeon/cik.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
> index 62eab82a64f9..daff9a2af3be 100644
> --- a/drivers/gpu/drm/radeon/cik.c
> +++ b/drivers/gpu/drm/radeon/cik.c
> @@ -221,9 +221,7 @@ int ci_get_temp(struct radeon_device *rdev)
> else
> actual_temp = temp & 0x1ff;
>
> - actual_temp = actual_temp * 1000;
> -
> - return actual_temp;
> + return actual_temp * 1000;
> }
>
> /* get temperature in millidegrees */
> @@ -239,9 +237,7 @@ int kv_get_temp(struct radeon_device *rdev)
> else
> actual_temp = 0;
>
> - actual_temp = actual_temp * 1000;
> -
> - return actual_temp;
> + return actual_temp * 1000;
> }
>
> /*
>
\
 
 \ /
  Last update: 2019-10-23 17:10    [W:0.067 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site