* [PATCH][next] drm/amdgpu: remove redundant variable r and redundant return statement
@ 2019-10-03 21:40 Colin King
2019-10-04 7:29 ` Koenig, Christian
0 siblings, 1 reply; 3+ messages in thread
From: Colin King @ 2019-10-03 21:40 UTC (permalink / raw)
To: Alex Deucher, Christian König, David Zhou, David Airlie,
Daniel Vetter, amd-gfx, dri-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
There is a return statement that is not reachable and a variable that
is not used. Remove them.
Addresses-Coverity: ("Structurally dead code")
Fixes: de7b45babd9b ("drm/amdgpu: cleanup creating BOs at fixed location (v2)")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 481e4c381083..814159f15633 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1636,7 +1636,6 @@ static void amdgpu_ttm_fw_reserve_vram_fini(struct amdgpu_device *adev)
static int amdgpu_ttm_fw_reserve_vram_init(struct amdgpu_device *adev)
{
uint64_t vram_size = adev->gmc.visible_vram_size;
- int r;
adev->fw_vram_usage.va = NULL;
adev->fw_vram_usage.reserved_bo = NULL;
@@ -1651,7 +1650,6 @@ static int amdgpu_ttm_fw_reserve_vram_init(struct amdgpu_device *adev)
AMDGPU_GEM_DOMAIN_VRAM,
&adev->fw_vram_usage.reserved_bo,
&adev->fw_vram_usage.va);
- return r;
}
/**
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][next] drm/amdgpu: remove redundant variable r and redundant return statement
2019-10-03 21:40 [PATCH][next] drm/amdgpu: remove redundant variable r and redundant return statement Colin King
@ 2019-10-04 7:29 ` Koenig, Christian
2019-10-04 12:57 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Koenig, Christian @ 2019-10-04 7:29 UTC (permalink / raw)
To: Colin King, Deucher, Alexander, Zhou, David(ChunMing),
David Airlie, Daniel Vetter, amd-gfx, dri-devel
Cc: kernel-janitors, linux-kernel
Am 03.10.19 um 23:40 schrieb Colin King:
> From: Colin Ian King <colin.king@canonical.com>
>
> There is a return statement that is not reachable and a variable that
> is not used. Remove them.
>
> Addresses-Coverity: ("Structurally dead code")
> Fixes: de7b45babd9b ("drm/amdgpu: cleanup creating BOs at fixed location (v2)")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 481e4c381083..814159f15633 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -1636,7 +1636,6 @@ static void amdgpu_ttm_fw_reserve_vram_fini(struct amdgpu_device *adev)
> static int amdgpu_ttm_fw_reserve_vram_init(struct amdgpu_device *adev)
> {
> uint64_t vram_size = adev->gmc.visible_vram_size;
> - int r;
>
> adev->fw_vram_usage.va = NULL;
> adev->fw_vram_usage.reserved_bo = NULL;
> @@ -1651,7 +1650,6 @@ static int amdgpu_ttm_fw_reserve_vram_init(struct amdgpu_device *adev)
> AMDGPU_GEM_DOMAIN_VRAM,
> &adev->fw_vram_usage.reserved_bo,
> &adev->fw_vram_usage.va);
> - return r;
> }
>
> /**
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] drm/amdgpu: remove redundant variable r and redundant return statement
2019-10-04 7:29 ` Koenig, Christian
@ 2019-10-04 12:57 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2019-10-04 12:57 UTC (permalink / raw)
To: Koenig, Christian
Cc: Colin King, Deucher, Alexander, Zhou, David(ChunMing),
David Airlie, Daniel Vetter, amd-gfx, dri-devel, kernel-janitors,
linux-kernel
On Fri, Oct 4, 2019 at 3:29 AM Koenig, Christian
<Christian.Koenig@amd.com> wrote:
>
> Am 03.10.19 um 23:40 schrieb Colin King:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > There is a return statement that is not reachable and a variable that
> > is not used. Remove them.
> >
> > Addresses-Coverity: ("Structurally dead code")
> > Fixes: de7b45babd9b ("drm/amdgpu: cleanup creating BOs at fixed location (v2)")
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
Applied. Thanks!
Alex
>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> > index 481e4c381083..814159f15633 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> > @@ -1636,7 +1636,6 @@ static void amdgpu_ttm_fw_reserve_vram_fini(struct amdgpu_device *adev)
> > static int amdgpu_ttm_fw_reserve_vram_init(struct amdgpu_device *adev)
> > {
> > uint64_t vram_size = adev->gmc.visible_vram_size;
> > - int r;
> >
> > adev->fw_vram_usage.va = NULL;
> > adev->fw_vram_usage.reserved_bo = NULL;
> > @@ -1651,7 +1650,6 @@ static int amdgpu_ttm_fw_reserve_vram_init(struct amdgpu_device *adev)
> > AMDGPU_GEM_DOMAIN_VRAM,
> > &adev->fw_vram_usage.reserved_bo,
> > &adev->fw_vram_usage.va);
> > - return r;
> > }
> >
> > /**
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-04 12:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03 21:40 [PATCH][next] drm/amdgpu: remove redundant variable r and redundant return statement Colin King
2019-10-04 7:29 ` Koenig, Christian
2019-10-04 12:57 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).