lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20230726101222.168710-1-wangzhu9@huawei.com>
Date:   Wed, 26 Jul 2023 18:12:22 +0800
From:   Zhu Wang <wangzhu9@...wei.com>
To:     <alexander.deucher@....com>, <christian.koenig@....com>,
        <Xinhui.Pan@....com>, <airlied@...il.com>, <daniel@...ll.ch>,
        <matthew.auld@...el.com>, <amd-gfx@...ts.freedesktop.org>,
        <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
CC:     <wangzhu9@...wei.com>
Subject: [PATCH -next] drm/radeon: fix -Wunused-but-set-variable warning

When building with W=1, the following warning occurs.

drivers/gpu/drm/radeon/radeon_ttm.c:200:20: warning: variable ‘rbo’ set but not used [-Wunused-but-set-variable]
  struct radeon_bo *rbo;

The variable 'rbo' is used only in WARN_ON_ONCE in the function
radeon_bo_move, and WARN_ON_ONCE is removed in the following
patch, so we removed 'rbo' to remove the
-Wunused-but-set-variable warning.

Fixes: f87c1f0b7b79 ("drm/ttm: prevent moving of pinned BOs")
Signed-off-by: Zhu Wang <wangzhu9@...wei.com>
---
 drivers/gpu/drm/radeon/radeon_ttm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 4eb83ccc4906..de4e6d78f1e1 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -197,7 +197,6 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
 {
 	struct ttm_resource *old_mem = bo->resource;
 	struct radeon_device *rdev;
-	struct radeon_bo *rbo;
 	int r;
 
 	if (new_mem->mem_type == TTM_PL_TT) {
@@ -210,7 +209,6 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
 	if (r)
 		return r;
 
-	rbo = container_of(bo, struct radeon_bo, tbo);
 	rdev = radeon_get_rdev(bo->bdev);
 	if (!old_mem || (old_mem->mem_type == TTM_PL_SYSTEM &&
 			 bo->ttm == NULL)) {
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ