2022-09-02 07:40:59

by CGEL

[permalink] [raw]
Subject: [PATCH linux-next] drm/radeon: Remove the unneeded result variable

From: ye xingchen <[email protected]>

Return the value radeon_drm_ioctl() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: ye xingchen <[email protected]>
---
drivers/gpu/drm/radeon/radeon_drv.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index a28d5ceab628..6cbe1ab81aba 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -512,14 +512,11 @@ long radeon_drm_ioctl(struct file *filp,
static long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
unsigned int nr = DRM_IOCTL_NR(cmd);
- int ret;

if (nr < DRM_COMMAND_BASE)
return drm_compat_ioctl(filp, cmd, arg);

- ret = radeon_drm_ioctl(filp, cmd, arg);
-
- return ret;
+ return radeon_drm_ioctl(filp, cmd, arg);
}
#endif

--
2.25.1


2022-09-09 20:48:58

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH linux-next] drm/radeon: Remove the unneeded result variable

Applied. Thanks!

Alex

On Fri, Sep 2, 2022 at 3:33 AM <[email protected]> wrote:
>
> From: ye xingchen <[email protected]>
>
> Return the value radeon_drm_ioctl() directly instead of storing it in
> another redundant variable.
>
> Reported-by: Zeal Robot <[email protected]>
> Signed-off-by: ye xingchen <[email protected]>
> ---
> drivers/gpu/drm/radeon/radeon_drv.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index a28d5ceab628..6cbe1ab81aba 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -512,14 +512,11 @@ long radeon_drm_ioctl(struct file *filp,
> static long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
> {
> unsigned int nr = DRM_IOCTL_NR(cmd);
> - int ret;
>
> if (nr < DRM_COMMAND_BASE)
> return drm_compat_ioctl(filp, cmd, arg);
>
> - ret = radeon_drm_ioctl(filp, cmd, arg);
> -
> - return ret;
> + return radeon_drm_ioctl(filp, cmd, arg);
> }
> #endif
>
> --
> 2.25.1