aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Wallménius <nils.wallmenius@gmail.com>2016-05-02 12:46:15 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-04 20:20:10 -0400
commit06ab6832ac06c77332e3b0415977acf68ea364cf (patch)
treeb40e6011af74c5c1da7ce91305235b1b0139d22a
parent62250a910a4090f88b729e04baf4369d78ba5bdc (diff)
drm/amdgpu: Mark all instances of struct drm_info_list as const
All these are compile time constand and the drm_debugfs_create/remove_files functions take a const pointer argument. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c2
8 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 660213a1682a..d1ad7634f351 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1701,12 +1701,12 @@ static inline void amdgpu_mn_unregister(struct amdgpu_bo *bo) {}
1701 * Debugfs 1701 * Debugfs
1702 */ 1702 */
1703struct amdgpu_debugfs { 1703struct amdgpu_debugfs {
1704 struct drm_info_list *files; 1704 const struct drm_info_list *files;
1705 unsigned num_files; 1705 unsigned num_files;
1706}; 1706};
1707 1707
1708int amdgpu_debugfs_add_files(struct amdgpu_device *adev, 1708int amdgpu_debugfs_add_files(struct amdgpu_device *adev,
1709 struct drm_info_list *files, 1709 const struct drm_info_list *files,
1710 unsigned nfiles); 1710 unsigned nfiles);
1711int amdgpu_debugfs_fence_init(struct amdgpu_device *adev); 1711int amdgpu_debugfs_fence_init(struct amdgpu_device *adev);
1712 1712
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index fa848ade51f1..c7974ff470e5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2009,7 +2009,7 @@ void amdgpu_get_pcie_info(struct amdgpu_device *adev)
2009 * Debugfs 2009 * Debugfs
2010 */ 2010 */
2011int amdgpu_debugfs_add_files(struct amdgpu_device *adev, 2011int amdgpu_debugfs_add_files(struct amdgpu_device *adev,
2012 struct drm_info_list *files, 2012 const struct drm_info_list *files,
2013 unsigned nfiles) 2013 unsigned nfiles)
2014{ 2014{
2015 unsigned i; 2015 unsigned i;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index d81f1f4883a6..100f4c6a8c1b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -639,7 +639,7 @@ static int amdgpu_debugfs_gpu_reset(struct seq_file *m, void *data)
639 return 0; 639 return 0;
640} 640}
641 641
642static struct drm_info_list amdgpu_debugfs_fence_list[] = { 642static const struct drm_info_list amdgpu_debugfs_fence_list[] = {
643 {"amdgpu_fence_info", &amdgpu_debugfs_fence_info, 0, NULL}, 643 {"amdgpu_fence_info", &amdgpu_debugfs_fence_info, 0, NULL},
644 {"amdgpu_gpu_reset", &amdgpu_debugfs_gpu_reset, 0, NULL} 644 {"amdgpu_gpu_reset", &amdgpu_debugfs_gpu_reset, 0, NULL}
645}; 645};
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index fa6a27bff298..0635bb6b45c4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -797,7 +797,7 @@ static int amdgpu_debugfs_gem_info(struct seq_file *m, void *data)
797 return 0; 797 return 0;
798} 798}
799 799
800static struct drm_info_list amdgpu_debugfs_gem_list[] = { 800static const struct drm_info_list amdgpu_debugfs_gem_list[] = {
801 {"amdgpu_gem_info", &amdgpu_debugfs_gem_info, 0, NULL}, 801 {"amdgpu_gem_info", &amdgpu_debugfs_gem_info, 0, NULL},
802}; 802};
803#endif 803#endif
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 83973d051080..0129617a7962 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -329,7 +329,7 @@ static int amdgpu_debugfs_sa_info(struct seq_file *m, void *data)
329 329
330} 330}
331 331
332static struct drm_info_list amdgpu_debugfs_sa_list[] = { 332static const struct drm_info_list amdgpu_debugfs_sa_list[] = {
333 {"amdgpu_sa_info", &amdgpu_debugfs_sa_info, 0, NULL}, 333 {"amdgpu_sa_info", &amdgpu_debugfs_sa_info, 0, NULL},
334}; 334};
335 335
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index ff9597ce268c..6d44d4a64698 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -1212,7 +1212,7 @@ static int amdgpu_debugfs_pm_info(struct seq_file *m, void *data)
1212 return 0; 1212 return 0;
1213} 1213}
1214 1214
1215static struct drm_info_list amdgpu_pm_info_list[] = { 1215static const struct drm_info_list amdgpu_pm_info_list[] = {
1216 {"amdgpu_pm_info", amdgpu_debugfs_pm_info, 0, NULL}, 1216 {"amdgpu_pm_info", amdgpu_debugfs_pm_info, 0, NULL},
1217}; 1217};
1218#endif 1218#endif
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index dd79243d0a37..7bd31ae10b33 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
@@ -427,7 +427,7 @@ static int r600_uvd_index = offsetof(struct amdgpu_device, uvd.ring);
427static int si_vce1_index = offsetof(struct amdgpu_device, vce.ring[0]); 427static int si_vce1_index = offsetof(struct amdgpu_device, vce.ring[0]);
428static int si_vce2_index = offsetof(struct amdgpu_device, vce.ring[1]); 428static int si_vce2_index = offsetof(struct amdgpu_device, vce.ring[1]);
429 429
430static struct drm_info_list amdgpu_debugfs_ring_info_list[] = { 430static const struct drm_info_list amdgpu_debugfs_ring_info_list[] = {
431 {"amdgpu_ring_gfx", amdgpu_debugfs_ring_info, 0, &amdgpu_gfx_index}, 431 {"amdgpu_ring_gfx", amdgpu_debugfs_ring_info, 0, &amdgpu_gfx_index},
432 {"amdgpu_ring_cp1", amdgpu_debugfs_ring_info, 0, &cayman_cp1_index}, 432 {"amdgpu_ring_cp1", amdgpu_debugfs_ring_info, 0, &cayman_cp1_index},
433 {"amdgpu_ring_cp2", amdgpu_debugfs_ring_info, 0, &cayman_cp2_index}, 433 {"amdgpu_ring_cp2", amdgpu_debugfs_ring_info, 0, &cayman_cp2_index},
@@ -445,7 +445,7 @@ static int amdgpu_debugfs_ring_init(struct amdgpu_device *adev, struct amdgpu_ri
445#if defined(CONFIG_DEBUG_FS) 445#if defined(CONFIG_DEBUG_FS)
446 unsigned i; 446 unsigned i;
447 for (i = 0; i < ARRAY_SIZE(amdgpu_debugfs_ring_info_list); ++i) { 447 for (i = 0; i < ARRAY_SIZE(amdgpu_debugfs_ring_info_list); ++i) {
448 struct drm_info_list *info = &amdgpu_debugfs_ring_info_list[i]; 448 const struct drm_info_list *info = &amdgpu_debugfs_ring_info_list[i];
449 int roffset = *(int*)amdgpu_debugfs_ring_info_list[i].data; 449 int roffset = *(int*)amdgpu_debugfs_ring_info_list[i].data;
450 struct amdgpu_ring *other = (void *)(((uint8_t*)adev) + roffset); 450 struct amdgpu_ring *other = (void *)(((uint8_t*)adev) + roffset);
451 unsigned r; 451 unsigned r;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 7a8bdfedff1d..7f5fc29354f7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1165,7 +1165,7 @@ static int amdgpu_mm_dump_table(struct seq_file *m, void *data)
1165static int ttm_pl_vram = TTM_PL_VRAM; 1165static int ttm_pl_vram = TTM_PL_VRAM;
1166static int ttm_pl_tt = TTM_PL_TT; 1166static int ttm_pl_tt = TTM_PL_TT;
1167 1167
1168static struct drm_info_list amdgpu_ttm_debugfs_list[] = { 1168static const struct drm_info_list amdgpu_ttm_debugfs_list[] = {
1169 {"amdgpu_vram_mm", amdgpu_mm_dump_table, 0, &ttm_pl_vram}, 1169 {"amdgpu_vram_mm", amdgpu_mm_dump_table, 0, &ttm_pl_vram},
1170 {"amdgpu_gtt_mm", amdgpu_mm_dump_table, 0, &ttm_pl_tt}, 1170 {"amdgpu_gtt_mm", amdgpu_mm_dump_table, 0, &ttm_pl_tt},
1171 {"ttm_page_pool", ttm_page_alloc_debugfs, 0, NULL}, 1171 {"ttm_page_pool", ttm_page_alloc_debugfs, 0, NULL},