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_OeWEJq7Re-usY=m8vThD2jLyXObL6Cn_k3mZweFW_+Pg@mail.gmail.com>
Date:   Tue, 18 Jan 2022 15:31:26 -0500
From:   Alex Deucher <alexdeucher@...il.com>
To:     CGEL <cgel.zte@...il.com>
Cc:     "Deucher, Alexander" <alexander.deucher@....com>,
        "Lazar, Lijo" <lijo.lazar@....com>, Dave Airlie <airlied@...ux.ie>,
        Lang Yu <lang.yu@....com>, Oak Zeng <Oak.Zeng@....com>,
        xinhui pan <Xinhui.Pan@....com>,
        LKML <linux-kernel@...r.kernel.org>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        Zeal Robot <zealci@....com.cn>,
        Minghao Chi <chi.minghao@....com.cn>,
        "Kim, Jonathan" <jonathan.kim@....com>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>,
        "Li, Candice" <candice.li@....com>,
        John Clements <john.clements@....com>,
        Christian Koenig <christian.koenig@....com>,
        Hawking Zhang <Hawking.Zhang@....com>
Subject: Re: [PATCH] amdgpu/amdgpu_psp: remove unneeded ret variable

Applied.  Thanks!

Alex

On Tue, Jan 18, 2022 at 2:57 AM <cgel.zte@...il.com> wrote:
>
> From: Minghao Chi <chi.minghao@....com.cn>
>
> Return value from amdgpu_bo_create_kernel() directly instead
> of taking this in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index dee17a0e1187..ac2b87f81ef9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -914,19 +914,15 @@ static void psp_prep_ta_load_cmd_buf(struct psp_gfx_cmd_resp *cmd,
>  static int psp_ta_init_shared_buf(struct psp_context *psp,
>                                   struct ta_mem_context *mem_ctx)
>  {
> -       int ret;
> -
>         /*
>         * Allocate 16k memory aligned to 4k from Frame Buffer (local
>         * physical) for ta to host memory
>         */
> -       ret = amdgpu_bo_create_kernel(psp->adev, mem_ctx->shared_mem_size,
> +       return amdgpu_bo_create_kernel(psp->adev, mem_ctx->shared_mem_size,
>                                       PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM,
>                                       &mem_ctx->shared_bo,
>                                       &mem_ctx->shared_mc_addr,
>                                       &mem_ctx->shared_buf);
> -
> -       return ret;
>  }
>
>  static void psp_ta_free_shared_buf(struct ta_mem_context *mem_ctx)
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ