lkml.org 
[lkml]   [2021]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-next: build failure after merge of the hmm tree
On Mon, Aug 23, 2021 at 05:50:27PM +1000, Stephen Rothwell wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 23 Aug 2021 17:46:27 +1000
> Subject: [PATCH] drm/i915/ttm: fix up for "lib/scatterlist: Provide a
> dedicated function to support tableappend"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> index 771eb2963123..d3d95934a047 100644
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> @@ -382,7 +382,6 @@ i915_ttm_region(struct ttm_device *bdev, int ttm_mem_type)
> static struct sg_table *i915_ttm_tt_get_st(struct ttm_tt *ttm)
> {
> struct i915_ttm_tt *i915_tt = container_of(ttm, typeof(*i915_tt), ttm);
> - struct scatterlist *sg;
> struct sg_table *st;
> int ret;
>
> @@ -393,13 +392,13 @@ static struct sg_table *i915_ttm_tt_get_st(struct ttm_tt *ttm)
> if (!st)
> return ERR_PTR(-ENOMEM);
>
> - sg = __sg_alloc_table_from_pages
> + ret = sg_alloc_table_from_pages_segment
> (st, ttm->pages, ttm->num_pages, 0,
> (unsigned long)ttm->num_pages << PAGE_SHIFT,
> - i915_sg_segment_size(), NULL, 0, GFP_KERNEL);
> - if (IS_ERR(sg)) {
> + i915_sg_segment_size(), GFP_KERNEL);
> + if (ret) {
> kfree(st);
> - return ERR_CAST(sg);
> + return ERR_PTR(ret);
> }

Looks right, thanks

Jason

\
 
 \ /
  Last update: 2021-08-23 19:34    [W:0.054 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site