From: Colin Ian King <colin.i.king@gmail.com>
Date: Wed, 12 Jan 2022 23:20:36 +0000 (+0000)
Subject: drm/vc4: remove redundant assignment of variable size
X-Git-Tag: howlett/maple/20220722_2~936^2~20^2~76
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7f0fec39c9ee3d0f82aa6c5895029e4ab5ec08d0;p=users%2Fjedix%2Flinux-maple.git

drm/vc4: remove redundant assignment of variable size

The variable 'size' is being assigned a value that is never read,
the assignment is redundant and can be removed. Cleans up clang-scan
warning:

drivers/gpu/drm/vc4/vc4_bo.c:358:2: warning: Value stored to 'size'
is never read [deadcode.DeadStores]
        size = roundup(size, PAGE_SIZE);

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220112232036.1182846-1-colin.i.king@gmail.com
---

diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
index 6d1281a343e9..e451cc5bcfac 100644
--- a/drivers/gpu/drm/vc4/vc4_bo.c
+++ b/drivers/gpu/drm/vc4/vc4_bo.c
@@ -355,8 +355,6 @@ static struct vc4_bo *vc4_bo_get_from_cache(struct drm_device *dev,
 	uint32_t page_index = bo_page_index(size);
 	struct vc4_bo *bo = NULL;
 
-	size = roundup(size, PAGE_SIZE);
-
 	mutex_lock(&vc4->bo_lock);
 	if (page_index >= vc4->bo_cache.size_list_size)
 		goto out;