The pointer reg is being assigned a value that is not read, the
exit path via label 'out' never accesses it. The assignment is
redundant and can be removed.
Cleans up clang scan build warning:
drivers/gpu/drm/radeon/radeon_object.c:570:3: warning: Value
stored to 'reg' is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <[email protected]>
---
drivers/gpu/drm/radeon/radeon_object.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index 56ede9d63b12..87536d205593 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -567,7 +567,6 @@ int radeon_bo_get_surface_reg(struct radeon_bo *bo)
return 0;
if (bo->surface_reg >= 0) {
- reg = &rdev->surface_regs[bo->surface_reg];
i = bo->surface_reg;
goto out;
}
--
2.33.1
On Wed, Jan 19, 2022 at 2:46 PM Colin Ian King <[email protected]> wrote:
>
> The pointer reg is being assigned a value that is not read, the
> exit path via label 'out' never accesses it. The assignment is
> redundant and can be removed.
>
> Cleans up clang scan build warning:
> drivers/gpu/drm/radeon/radeon_object.c:570:3: warning: Value
> stored to 'reg' is never read [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <[email protected]>
Thanks for the patch!
Reviewed-by: Nick Desaulniers <[email protected]>
> ---
> drivers/gpu/drm/radeon/radeon_object.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
> index 56ede9d63b12..87536d205593 100644
> --- a/drivers/gpu/drm/radeon/radeon_object.c
> +++ b/drivers/gpu/drm/radeon/radeon_object.c
> @@ -567,7 +567,6 @@ int radeon_bo_get_surface_reg(struct radeon_bo *bo)
> return 0;
>
> if (bo->surface_reg >= 0) {
> - reg = &rdev->surface_regs[bo->surface_reg];
> i = bo->surface_reg;
> goto out;
> }
> --
> 2.33.1
>
>
--
Thanks,
~Nick Desaulniers
Applied. Thanks!
Alex
On Mon, Jan 24, 2022 at 3:21 PM Nick Desaulniers
<[email protected]> wrote:
>
> On Wed, Jan 19, 2022 at 2:46 PM Colin Ian King <[email protected]> wrote:
> >
> > The pointer reg is being assigned a value that is not read, the
> > exit path via label 'out' never accesses it. The assignment is
> > redundant and can be removed.
> >
> > Cleans up clang scan build warning:
> > drivers/gpu/drm/radeon/radeon_object.c:570:3: warning: Value
> > stored to 'reg' is never read [deadcode.DeadStores]
> >
> > Signed-off-by: Colin Ian King <[email protected]>
>
> Thanks for the patch!
> Reviewed-by: Nick Desaulniers <[email protected]>
>
> > ---
> > drivers/gpu/drm/radeon/radeon_object.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
> > index 56ede9d63b12..87536d205593 100644
> > --- a/drivers/gpu/drm/radeon/radeon_object.c
> > +++ b/drivers/gpu/drm/radeon/radeon_object.c
> > @@ -567,7 +567,6 @@ int radeon_bo_get_surface_reg(struct radeon_bo *bo)
> > return 0;
> >
> > if (bo->surface_reg >= 0) {
> > - reg = &rdev->surface_regs[bo->surface_reg];
> > i = bo->surface_reg;
> > goto out;
> > }
> > --
> > 2.33.1
> >
> >
>
>
> --
> Thanks,
> ~Nick Desaulniers