[PATCH -next] drm/i915: Use memdup_user() helper

2024-09-03 Thread Jinjie Ruan
Switching to memdup_user(), which combines kmalloc() and copy_from_user(), and it can simplfy code. Signed-off-by: Jinjie Ruan --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/gem

[Intel-gfx] [PATCH -next] drm/i915/gvt: Use list_for_each_entry() helper

2023-08-31 Thread Jinjie Ruan
Convert list_for_each() to list_for_each_entry() so that the pos list_head pointer and list_entry() call are no longer needed, which can reduce a few lines of code. No functional changed. Signed-off-by: Jinjie Ruan --- drivers/gpu/drm/i915/gvt/dmabuf.c | 8 ++-- 1 file changed, 2 insertions