[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211018090955.857276-1-luo.penghao@zte.com.cn>
Date: Mon, 18 Oct 2021 09:09:55 +0000
From: luo penghao <cgel.zte@...il.com>
To: Jani Nikula <jani.nikula@...ux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Stephen Rothwell <sfr@...b.auug.org.au>,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, penghao luo <luo.penghao@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] drm/i915: Remove redundant assignments
From: penghao luo <luo.penghao@....com.cn>
The assignment of variables will be overwritten later, so the
assignment here is meaningless.
The clang_analyzer complains as follows:
drivers/gpu/drm/i915/gem/i915_gem_userptr.c:291: warning:
Although the value stored to 'ret' is used in the enclosing expression,
the value is never actually read from 'ret’.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: penghao luo <luo.penghao@....com.cn>
---
drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
index 8ea0fa6..f6f944d 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
@@ -288,7 +288,7 @@ int i915_gem_object_userptr_submit_init(struct drm_i915_gem_object *obj)
if (!i915_gem_object_is_readonly(obj))
gup_flags |= FOLL_WRITE;
- pinned = ret = 0;
+ pinned = 0;
while (pinned < num_pages) {
ret = pin_user_pages_fast(obj->userptr.ptr + pinned * PAGE_SIZE,
num_pages - pinned, gup_flags,
--
2.15.2
Powered by blists - more mailing lists