diff options
author | Christian König <christian.koenig@amd.com> | 2014-06-04 15:29:57 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-06-09 22:06:51 -0400 |
commit | 7f90fc965023d72589a4e5fc02ac812e3a6ac809 (patch) | |
tree | 187365b8157da56cd1928ff5d9e5b263f4e73d73 /drivers/gpu/drm/radeon/r300.c | |
parent | 0986c1a55ca64b44ee126a2f719a6e9f28cbe0ed (diff) | |
download | blackbird-op-linux-7f90fc965023d72589a4e5fc02ac812e3a6ac809.tar.gz blackbird-op-linux-7f90fc965023d72589a4e5fc02ac812e3a6ac809.zip |
drm/radeon: remove range check from *_gart_set_page
We never check the return value anyway and if the
index isn't valid would crash way before calling
the functions.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r300.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r300.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index 206caf9700b7..3c21d77a483d 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c @@ -72,13 +72,11 @@ void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev) #define R300_PTE_WRITEABLE (1 << 2) #define R300_PTE_READABLE (1 << 3) -int rv370_pcie_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr) +void rv370_pcie_gart_set_page(struct radeon_device *rdev, unsigned i, + uint64_t addr) { void __iomem *ptr = rdev->gart.ptr; - if (i < 0 || i > rdev->gart.num_gpu_pages) { - return -EINVAL; - } addr = (lower_32_bits(addr) >> 8) | ((upper_32_bits(addr) & 0xff) << 24) | R300_PTE_WRITEABLE | R300_PTE_READABLE; @@ -86,7 +84,6 @@ int rv370_pcie_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr) * on powerpc without HW swappers, it'll get swapped on way * into VRAM - so no need for cpu_to_le32 on VRAM tables */ writel(addr, ((void __iomem *)ptr) + (i * 4)); - return 0; } int rv370_pcie_gart_init(struct radeon_device *rdev) |