Re: [PATCH] drm/amdgpu/virt: remove redundant variable pf2vf_ver

From: Alex Deucher
Date: Mon Nov 13 2017 - 14:21:56 EST


On Mon, Nov 13, 2017 at 9:40 AM, Chen, Horace <Horace.Chen@xxxxxxx> wrote:
> Reivewed-by: Horace Chen <horace.chen@xxxxxxx>

Applied. thanks!

Alex

>
> -----Original Message-----
> From: Liu, Monk
> Sent: Monday, November 13, 2017 11:43 AM
> To: Chen, Horace <Horace.Chen@xxxxxxx>; Colin King <colin.king@xxxxxxxxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Koenig, Christian <Christian.Koenig@xxxxxxx>; David Airlie <airlied@xxxxxxxx>; Yu, Xiangliang <Xiangliang.Yu@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx; dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Cc: kernel-janitors@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: RE: [PATCH] drm/amdgpu/virt: remove redundant variable pf2vf_ver
> Importance: High
>
> + Horace
>
> -----Original Message-----
> From: Colin King [mailto:colin.king@xxxxxxxxxxxxx]
> Sent: 2017å11æ11æ 19:51
> To: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Koenig, Christian <Christian.Koenig@xxxxxxx>; David Airlie <airlied@xxxxxxxx>; Liu, Monk <Monk.Liu@xxxxxxx>; Yu, Xiangliang <Xiangliang.Yu@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx; dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Cc: kernel-janitors@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: [PATCH] drm/amdgpu/virt: remove redundant variable pf2vf_ver
>
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> Variable pf2vf_ver is assigned but never read, it is redundant and hence can be removed.
>
> Cleans up clang warning:
> drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:310:3: warning: Value stored to 'pf2vf_ver' is never read
>
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> index 6738df836a70..b1cc179512fa 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> @@ -296,7 +296,6 @@ int amdgpu_virt_fw_reserve_get_checksum(void *obj,
>
> void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev) {
> - uint32_t pf2vf_ver = 0;
> uint32_t pf2vf_size = 0;
> uint32_t checksum = 0;
> uint32_t checkval;
> @@ -309,7 +308,6 @@ void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev)
> adev->virt.fw_reserve.p_pf2vf =
> (struct amdgim_pf2vf_info_header *)(
> adev->fw_vram_usage.va + AMDGIM_DATAEXCHANGE_OFFSET);
> - pf2vf_ver = adev->virt.fw_reserve.p_pf2vf->version;
> AMDGPU_FW_VRAM_PF2VF_READ(adev, header.size, &pf2vf_size);
> AMDGPU_FW_VRAM_PF2VF_READ(adev, checksum, &checksum);
>
> --
> 2.14.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx