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] [day] [month] [year] [list]
Message-ID: <CADnq5_MEf3o6GVEkD5gQYgp4CMwogm=mVZFLquUEbRfjp3wh6Q@mail.gmail.com>
Date:   Mon, 13 Dec 2021 15:42:02 -0500
From:   Alex Deucher <alexdeucher@...il.com>
To:     CGEL <cgel.zte@...il.com>
Cc:     "Deucher, Alexander" <alexander.deucher@....com>,
        Alex Sierra <alex.sierra@....com>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>, Dave Airlie <airlied@...ux.ie>,
        Zeal Robot <zealci@....com.cm>, Oak Zeng <Oak.Zeng@....com>,
        xinhui pan <Xinhui.Pan@....com>,
        Rajneesh Bhardwaj <rajneesh.bhardwaj@....com>,
        chi.minghao@....com.cn, LKML <linux-kernel@...r.kernel.org>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        Likun Gao <Likun.Gao@....com>,
        John Clements <john.clements@....com>,
        Christian Koenig <christian.koenig@....com>,
        Hawking Zhang <Hawking.Zhang@....com>
Subject: Re: [PATCH] drm:amdgpu:remove unneeded variable

Applied.  Thanks!

Alex

On Thu, Dec 9, 2021 at 11:56 AM <cgel.zte@...il.com> wrote:
>
> From: chiminghao <chi.minghao@....com.cn>
>
> return value form directly instead of
> taking this in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@....com.cm>
> Signed-off-by: chiminghao <chi.minghao@....com.cn>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c | 5 +----
>  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c     | 6 ++----
>  2 files changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c
> index 5cf142e849bb..fb92f827eeb7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c
> @@ -37,12 +37,9 @@
>  long amdgpu_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 = amdgpu_drm_ioctl(filp, cmd, arg);
> -
> -       return ret;
> +       return amdgpu_drm_ioctl(filp, cmd, arg);
>  }
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index cb82404df534..269a7b04b7e7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -1742,7 +1742,7 @@ static int gmc_v9_0_hw_init(void *handle)
>  {
>         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>         bool value;
> -       int r, i;
> +       int i;
>
>         /* The sequence of these two function calls matters.*/
>         gmc_v9_0_init_golden_registers(adev);
> @@ -1777,9 +1777,7 @@ static int gmc_v9_0_hw_init(void *handle)
>         if (adev->umc.funcs && adev->umc.funcs->init_registers)
>                 adev->umc.funcs->init_registers(adev);
>
> -       r = gmc_v9_0_gart_enable(adev);
> -
> -       return r;
> +       return gmc_v9_0_gart_enable(adev);
>  }
>
>  /**
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ