lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2bed3fab-e84d-226d-b552-1ac088fc5d9c@amd.com>
Date:   Wed, 23 Oct 2019 15:09:40 +0000
From:   Harry Wentland <hwentlan@....com>
To:     Wambui Karuga <wambui@...uga.xyz>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
CC:     "airlied@...ux.ie" <airlied@...ux.ie>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
        "outreachy-kernel@...glegroups.com" 
        <outreachy-kernel@...glegroups.com>,
        "Deucher, Alexander" <Alexander.Deucher@....com>,
        "Koenig, Christian" <Christian.Koenig@....com>
Subject: Re: [PATCH] drm/radeon: remove assignment for return value

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@...uga.xyz>

Thanks for your patch.

Reviewed-by: Harry Wentland <harry.wentland@....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;
>  }
>  
>  /*
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ