From patchwork Sun Apr 10 14:30:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Nils_Wallm=C3=A9nius?= X-Patchwork-Id: 8789371 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7EFC1C0553 for ; Sun, 10 Apr 2016 14:30:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D900201F4 for ; Sun, 10 Apr 2016 14:30:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8DD1D20166 for ; Sun, 10 Apr 2016 14:30:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A2A9B6E187; Sun, 10 Apr 2016 14:30:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x241.google.com (mail-lf0-x241.google.com [IPv6:2a00:1450:4010:c07::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 26A1C6E16D for ; Sun, 10 Apr 2016 14:30:48 +0000 (UTC) Received: by mail-lf0-x241.google.com with SMTP id p64so5190434lfg.0 for ; Sun, 10 Apr 2016 07:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=n3semttvDReHR5xqfBY5y7ru/6Lv7wxpsOURHpYbj+E=; b=y3oMeugelLkao4H7x+arNzZ5VmzINz7Ae08BlaVSiS7VK0Pz1Qt0Aymtf9jJ+SaU0s Blui3jLyi9gCmSLr0BYt2eMcwhoU/hURJsJHL29ojkzva+okpvzvVe502RnoAQPMEfF9 PSILWJqPUmQUI4JQpnD4G6HufPSetCw7/o66uU5iFUGL20Cc772Z0INnuVtNoIYpLISq eeytuEvtBi1tGzTPu5LbsBCU2VWoGJehPJzui4SBvcukrBvNaoJstI4brrNXAcQcqGPi 2hJqPIfkePLKHAqj33yYY2Tlb1MYAW09wzY0Om2+xDlBCPxEtjIzY45nr3Y4QGHejuqL Gp5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n3semttvDReHR5xqfBY5y7ru/6Lv7wxpsOURHpYbj+E=; b=JeX6t95LllPMjTWTIPHNpC6/rV6JDxiXrxHRa7au81bpIv80FHspxQpirNJiCJKMsp LVOGrryDc612Vqz9gpPsprSuqK1kL2AiCrrMQ6uhI4F08eO0Uv1YZgPc5GSFVeNAwgpU S8XztYH2L15yUa9JqkG6NBOf2v7WSmeOjFshQAZWueA6iIWj6Phpnd9tG8Xe/eJLWRDr jnERUrnBJ3BD6yGgRvC7iueZyVN6YzvNSOwnEqViJSwjJ2rvipDYXOEDyg6wDNXxx5y8 KhokBLySvh2G9UQMZ5OQ2C63M1Q/Byj+2gVrdMpreAIe5FkKQkv+nvFsvPjMIujFlIjV IV4g== X-Gm-Message-State: AD7BkJIathGcqKZScvM2NgR5hkGY8Gpz8i6O0DTwIUotZIU2j7FRf1njhV/ms6BtxiOKsg== X-Received: by 10.25.79.16 with SMTP id d16mr5507607lfb.73.1460298646333; Sun, 10 Apr 2016 07:30:46 -0700 (PDT) Received: from desktop.lan (90-229-153-162-no193.tbcn.telia.com. [90.229.153.162]) by smtp.gmail.com with ESMTPSA id ai2sm3659493lbc.46.2016.04.10.07.30.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Apr 2016 07:30:45 -0700 (PDT) From: =?UTF-8?q?Nils=20Wallm=C3=A9nius?= To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/6] drm/amdgpu: Mark all instances of struct drm_info_list as const Date: Sun, 10 Apr 2016 16:30:01 +0200 Message-Id: <1460298604-15126-3-git-send-email-nils.wallmenius@gmail.com> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1460298604-15126-1-git-send-email-nils.wallmenius@gmail.com> References: <1460298604-15126-1-git-send-email-nils.wallmenius@gmail.com> MIME-Version: 1.0 Cc: =?UTF-8?q?Nils=20Wallm=C3=A9nius?= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All these are compile time constand and the drm_debugfs_create/remove_files functions take a const pointer argument. Signed-off-by: Nils Wallménius --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 660213a..d1ad763 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) {} * Debugfs */ struct amdgpu_debugfs { - struct drm_info_list *files; + const struct drm_info_list *files; unsigned num_files; }; int amdgpu_debugfs_add_files(struct amdgpu_device *adev, - struct drm_info_list *files, + const struct drm_info_list *files, unsigned nfiles); int amdgpu_debugfs_fence_init(struct amdgpu_device *adev); diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 00fa730..e3905c6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2022,7 +2022,7 @@ void amdgpu_get_pcie_info(struct amdgpu_device *adev) * Debugfs */ int amdgpu_debugfs_add_files(struct amdgpu_device *adev, - struct drm_info_list *files, + const struct drm_info_list *files, unsigned nfiles) { unsigned i; @@ -2193,7 +2193,7 @@ static int amdgpu_debugfs_print_status(struct seq_file *m, void *data) return 0; } -static struct drm_info_list amdgpu_debugfs_status_list[] = { +static const struct drm_info_list amdgpu_debugfs_status_list[] = { {"amdgpu_print_status", &amdgpu_debugfs_print_status, 0, NULL}, }; #endif diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index d81f1f4..100f4c6 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) return 0; } -static struct drm_info_list amdgpu_debugfs_fence_list[] = { +static const struct drm_info_list amdgpu_debugfs_fence_list[] = { {"amdgpu_fence_info", &amdgpu_debugfs_fence_info, 0, NULL}, {"amdgpu_gpu_reset", &amdgpu_debugfs_gpu_reset, 0, NULL} }; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index fa6a27b..0635bb6 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) return 0; } -static struct drm_info_list amdgpu_debugfs_gem_list[] = { +static const struct drm_info_list amdgpu_debugfs_gem_list[] = { {"amdgpu_gem_info", &amdgpu_debugfs_gem_info, 0, NULL}, }; #endif diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 83973d0..0129617 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) } -static struct drm_info_list amdgpu_debugfs_sa_list[] = { +static const struct drm_info_list amdgpu_debugfs_sa_list[] = { {"amdgpu_sa_info", &amdgpu_debugfs_sa_info, 0, NULL}, }; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index ff9597c..6d44d4a 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) return 0; } -static struct drm_info_list amdgpu_pm_info_list[] = { +static const struct drm_info_list amdgpu_pm_info_list[] = { {"amdgpu_pm_info", amdgpu_debugfs_pm_info, 0, NULL}, }; #endif diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index dd79243..7bd31ae 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); static int si_vce1_index = offsetof(struct amdgpu_device, vce.ring[0]); static int si_vce2_index = offsetof(struct amdgpu_device, vce.ring[1]); -static struct drm_info_list amdgpu_debugfs_ring_info_list[] = { +static const struct drm_info_list amdgpu_debugfs_ring_info_list[] = { {"amdgpu_ring_gfx", amdgpu_debugfs_ring_info, 0, &amdgpu_gfx_index}, {"amdgpu_ring_cp1", amdgpu_debugfs_ring_info, 0, &cayman_cp1_index}, {"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 #if defined(CONFIG_DEBUG_FS) unsigned i; for (i = 0; i < ARRAY_SIZE(amdgpu_debugfs_ring_info_list); ++i) { - struct drm_info_list *info = &amdgpu_debugfs_ring_info_list[i]; + const struct drm_info_list *info = &amdgpu_debugfs_ring_info_list[i]; int roffset = *(int*)amdgpu_debugfs_ring_info_list[i].data; struct amdgpu_ring *other = (void *)(((uint8_t*)adev) + roffset); unsigned r; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index c9692ad..43e8954 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) static int ttm_pl_vram = TTM_PL_VRAM; static int ttm_pl_tt = TTM_PL_TT; -static struct drm_info_list amdgpu_ttm_debugfs_list[] = { +static const struct drm_info_list amdgpu_ttm_debugfs_list[] = { {"amdgpu_vram_mm", amdgpu_mm_dump_table, 0, &ttm_pl_vram}, {"amdgpu_gtt_mm", amdgpu_mm_dump_table, 0, &ttm_pl_tt}, {"ttm_page_pool", ttm_page_alloc_debugfs, 0, NULL},