Message ID | 20201109211855.3340030-12-lee.jones@linaro.org |
---|---|
State | Accepted |
Commit | 4b7ec10bb7aeef279cf92598837a19aa9464c7f0 |
Headers | show |
Series | [01/20] drm/radeon/radeon_ttm: Place declaration of 'rdev' in same clause as its use | expand |
On Mon, Nov 9, 2020 at 4:19 PM Lee Jones <lee.jones@linaro.org> wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/radeon/r600.c: In function ‘r600_pcie_gart_tlb_flush’: > drivers/gpu/drm/radeon/r600.c:1083:7: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] > drivers/gpu/drm/radeon/r600.c: At top level: > drivers/gpu/drm/radeon/r600.c: In function ‘r600_mmio_hdp_flush’: > drivers/gpu/drm/radeon/r600.c:4393:7: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] > > Cc: Alex Deucher <alexander.deucher@amd.com> > Cc: "Christian König" <christian.koenig@amd.com> > Cc: David Airlie <airlied@linux.ie> > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: Sumit Semwal <sumit.semwal@linaro.org> > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Cc: linux-media@vger.kernel.org > Cc: linaro-mm-sig@lists.linaro.org > Signed-off-by: Lee Jones <lee.jones@linaro.org> Applied. Thanks! Alex > --- > drivers/gpu/drm/radeon/r600.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c > index d9a33ca768f34..6e780b0109995 100644 > --- a/drivers/gpu/drm/radeon/r600.c > +++ b/drivers/gpu/drm/radeon/r600.c > @@ -1080,7 +1080,6 @@ void r600_pcie_gart_tlb_flush(struct radeon_device *rdev) > if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) && > !(rdev->flags & RADEON_IS_AGP)) { > void __iomem *ptr = (void *)rdev->gart.ptr; > - u32 tmp; > > /* r7xx hw bug. write to HDP_DEBUG1 followed by fb read > * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL > @@ -1088,7 +1087,7 @@ void r600_pcie_gart_tlb_flush(struct radeon_device *rdev) > * method for them. > */ > WREG32(HDP_DEBUG1, 0); > - tmp = readl((void __iomem *)ptr); > + readl((void __iomem *)ptr); > } else > WREG32(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1); > > @@ -4390,10 +4389,9 @@ void r600_mmio_hdp_flush(struct radeon_device *rdev) > if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) && > rdev->vram_scratch.ptr && !(rdev->flags & RADEON_IS_AGP)) { > void __iomem *ptr = (void *)rdev->vram_scratch.ptr; > - u32 tmp; > > WREG32(HDP_DEBUG1, 0); > - tmp = readl((void __iomem *)ptr); > + readl((void __iomem *)ptr); > } else > WREG32(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1); > } > -- > 2.25.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index d9a33ca768f34..6e780b0109995 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -1080,7 +1080,6 @@ void r600_pcie_gart_tlb_flush(struct radeon_device *rdev) if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) && !(rdev->flags & RADEON_IS_AGP)) { void __iomem *ptr = (void *)rdev->gart.ptr; - u32 tmp; /* r7xx hw bug. write to HDP_DEBUG1 followed by fb read * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL @@ -1088,7 +1087,7 @@ void r600_pcie_gart_tlb_flush(struct radeon_device *rdev) * method for them. */ WREG32(HDP_DEBUG1, 0); - tmp = readl((void __iomem *)ptr); + readl((void __iomem *)ptr); } else WREG32(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1); @@ -4390,10 +4389,9 @@ void r600_mmio_hdp_flush(struct radeon_device *rdev) if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) && rdev->vram_scratch.ptr && !(rdev->flags & RADEON_IS_AGP)) { void __iomem *ptr = (void *)rdev->vram_scratch.ptr; - u32 tmp; WREG32(HDP_DEBUG1, 0); - tmp = readl((void __iomem *)ptr); + readl((void __iomem *)ptr); } else WREG32(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1); }
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/r600.c: In function ‘r600_pcie_gart_tlb_flush’: drivers/gpu/drm/radeon/r600.c:1083:7: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/radeon/r600.c: At top level: drivers/gpu/drm/radeon/r600.c: In function ‘r600_mmio_hdp_flush’: drivers/gpu/drm/radeon/r600.c:4393:7: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/gpu/drm/radeon/r600.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)