Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/radeon Don't assign value to ...
details: https://anonhg.NetBSD.org/src/rev/109572d129dc
branches: trunk
changeset: 346361:109572d129dc
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sun Jul 10 01:35:27 2016 +0000
description:
Don't assign value to rdev unless we're going to use the value.
Therefore, don't declare the variable unless we're going to assign it a
value.
diffstat:
sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (59 lines):
diff -r d40cf7cd5323 -r 109572d129dc sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c Sun Jul 10 00:14:36 2016 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c Sun Jul 10 01:35:27 2016 +0000
@@ -609,7 +609,6 @@
static int radeon_ttm_tt_populate(struct ttm_tt *ttm)
{
- struct radeon_device *rdev;
struct radeon_ttm_tt *gtt = (void *)ttm;
#ifndef __NetBSD__
unsigned i;
@@ -631,8 +630,8 @@
#endif
}
- rdev = radeon_get_rdev(ttm->bdev);
#if __OS_HAS_AGP
+ struct radeon_device *rdev = radeon_get_rdev(ttm->bdev);
if (rdev->flags & RADEON_IS_AGP) {
return ttm_agp_tt_populate(ttm);
}
@@ -644,6 +643,9 @@
#else
#ifdef CONFIG_SWIOTLB
+#if ! __OS_HAS_AGP
+ struct radeon_device *rdev = radeon_get_rdev(ttm->bdev);
+#endif
if (swiotlb_nr_tbl()) {
return ttm_dma_populate(>t->ttm, rdev->dev);
}
@@ -674,7 +676,6 @@
static void radeon_ttm_tt_unpopulate(struct ttm_tt *ttm)
{
- struct radeon_device *rdev;
struct radeon_ttm_tt *gtt = (void *)ttm;
#ifndef __NetBSD__
unsigned i;
@@ -684,8 +685,8 @@
if (slave)
return;
- rdev = radeon_get_rdev(ttm->bdev);
#if __OS_HAS_AGP
+ struct radeon_device *rdev = radeon_get_rdev(ttm->bdev);
if (rdev->flags & RADEON_IS_AGP) {
ttm_agp_tt_unpopulate(ttm);
return;
@@ -698,6 +699,9 @@
#else
#ifdef CONFIG_SWIOTLB
+#if ! __OS_HAS_AGP
+ struct radeon_device *rdev = radeon_get_rdev(ttm->bdev);
+#endif
if (swiotlb_nr_tbl()) {
ttm_dma_unpopulate(>t->ttm, rdev->dev);
return;
Home |
Main Index |
Thread Index |
Old Index