This patch switch to use sg_set_buf() and sg_dma_address() helpers, no
function change.
Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
---
drivers/gpu/drm/i915/i915_gpu_error.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 135ded17334e..9680cde47b5a 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -66,10 +66,8 @@
static void __sg_set_buf(struct scatterlist *sg,
void *addr, unsigned int len, loff_t it)
{
- sg->page_link = (unsigned long)virt_to_page(addr);
- sg->offset = offset_in_page(addr);
- sg->length = len;
- sg->dma_address = it;
+ sg_set_buf(sg, addr, len);
+ sg_dma_address(sg) = it;
}
static bool __i915_error_grow(struct drm_i915_error_state_buf *e, size_t len)
--
2.34.1