All of lore.kernel.org
 help / color / mirror / Atom feed
From: Isabella Basso <isabbasso@riseup.net>
To: alexander.deucher@amd.com, christian.koenig@amd.com,
	daniel@ffwll.ch, harry.wentland@amd.com,
	Rodrigo.Siqueira@amd.com, Felix.Kuehling@amd.com
Cc: ~lkcamp/patches@lists.sr.ht,
	Isabella Basso <isabbasso@riseup.net>,
	amd-gfx@lists.freedesktop.org
Subject: [PATCH 09/10] drm/amdgpu: remove unnecessary variables
Date: Tue,  7 Dec 2021 22:25:28 -0300	[thread overview]
Message-ID: <20211208012529.372478-10-isabbasso@riseup.net> (raw)
In-Reply-To: <20211208012529.372478-1-isabbasso@riseup.net>

This fixes the warnings below:

 In function 'svm_range_map_to_gpu':
 warning: variable 'bo_va' set but not used [-Wunused-but-set-variable]
 1172 |         struct amdgpu_bo_va bo_va;
      |                             ^~~~~
 ...
 In function 'dcn201_update_clocks':
 warning: variable 'enter_display_off' set but not used [-Wunused-but-set-variable]
 132 |         bool enter_display_off = false;
     |              ^~~~~~~~~~~~~~~~~

Signed-off-by: Isabella Basso <isabbasso@riseup.net>
---
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c                          | 3 +--
 .../gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c    | 4 ----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index 82cb45e30197..08b2130afa4c 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -1169,7 +1169,6 @@ svm_range_map_to_gpu(struct amdgpu_device *adev, struct amdgpu_vm *vm,
 		     unsigned long npages, bool readonly, dma_addr_t *dma_addr,
 		     struct amdgpu_device *bo_adev, struct dma_fence **fence)
 {
-	struct amdgpu_bo_va bo_va;
 	bool table_freed = false;
 	uint64_t pte_flags;
 	unsigned long last_start;
@@ -1183,7 +1182,7 @@ svm_range_map_to_gpu(struct amdgpu_device *adev, struct amdgpu_vm *vm,
 		 last_start, last_start + npages - 1, readonly);
 
 	if (prange->svm_bo && prange->ttm_res)
-		bo_va.is_xgmi = amdgpu_xgmi_same_hive(adev, bo_adev);
+		amdgpu_xgmi_same_hive(adev, bo_adev);
 
 	for (i = offset; i < offset + npages; i++) {
 		last_domain = dma_addr[i] & SVM_RANGE_VRAM_DOMAIN;
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c
index f7f46b886162..2ea813a56edf 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c
@@ -128,7 +128,6 @@ static void dcn201_update_clocks(struct clk_mgr *clk_mgr_base,
 	int display_count;
 	bool update_dppclk = false;
 	bool update_dispclk = false;
-	bool enter_display_off = false;
 	bool dpp_clock_lowered = false;
 	bool force_reset = false;
 	bool p_state_change_support;
@@ -146,9 +145,6 @@ static void dcn201_update_clocks(struct clk_mgr *clk_mgr_base,
 
 	display_count = clk_mgr_helper_get_active_display_cnt(dc, context);
 
-	if (display_count == 0)
-		enter_display_off = true;
-
 	if (should_set_clock(safe_to_lower, new_clocks->phyclk_khz, clk_mgr_base->clks.phyclk_khz))
 		clk_mgr_base->clks.phyclk_khz = new_clocks->phyclk_khz;
 
-- 
2.34.1


  parent reply	other threads:[~2021-12-08  3:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08  1:25 [PATCH 00/10] drm/amd: fix various compilation warnings Isabella Basso
2021-12-08  1:25 ` [PATCH 01/10] drm/amd: Mark IP_BASE definition as __maybe_unused Isabella Basso
2021-12-08 19:37   ` Alex Deucher
2021-12-08  1:25 ` [PATCH 02/10] drm/amd: fix improper docstring syntax Isabella Basso
2021-12-08 19:40   ` Alex Deucher
2021-12-08  1:25 ` [PATCH 03/10] drm/amdgpu: add missing function prototype for amdgpu_ras_mca_query_error_status Isabella Basso
2021-12-08 19:42   ` Alex Deucher
2021-12-08  1:25 ` [PATCH 04/10] drm/amdgpu: fix function scopes Isabella Basso
2021-12-08 19:44   ` Alex Deucher
2021-12-08  1:25 ` [PATCH 05/10] drm/amdkfd: " Isabella Basso
2021-12-08 19:46   ` Alex Deucher
2021-12-08  1:25 ` [PATCH 06/10] drm/amd/display: " Isabella Basso
2021-12-08 14:59   ` Rodrigo Siqueira Jordao
2021-12-08  1:25 ` [PATCH 07/10] drm/amd: append missing includes Isabella Basso
2021-12-08 15:10   ` Rodrigo Siqueira Jordao
2021-12-08 19:48     ` Alex Deucher
2021-12-08  1:25 ` [PATCH 08/10] drm/amdgpu: fix location of prototype for amdgpu_kms_compat_ioctl Isabella Basso
2021-12-08 19:50   ` Alex Deucher
2021-12-08  1:25 ` Isabella Basso [this message]
2021-12-08 15:08   ` [PATCH 09/10] drm/amdgpu: remove unnecessary variables Rodrigo Siqueira Jordao
2021-12-08 18:20   ` Felix Kuehling
2021-12-08  1:25 ` [PATCH 10/10] drm/amdgpu: re-format file header comments Isabella Basso
2021-12-08 19:52   ` Alex Deucher
2021-12-08 15:13 ` [PATCH 00/10] drm/amd: fix various compilation warnings Rodrigo Siqueira Jordao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211208012529.372478-10-isabbasso@riseup.net \
    --to=isabbasso@riseup.net \
    --cc=Felix.Kuehling@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=harry.wentland@amd.com \
    --cc=~lkcamp/patches@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.