dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Jason Gunthorpe <jgg@mellanox.com>,
	Dave Airlie <airlied@linux.ie>,
	DRI <dri-devel@lists.freedesktop.org>
Cc: "Jason Gunthorpe" <jgg@nvidia.com>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	"Leon Romanovsky" <leonro@nvidia.com>,
	"Maor Gottlieb" <maorg@nvidia.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Linux Next Mailing List" <linux-next@vger.kernel.org>
Subject: linux-next: build failure after merge of the hmm tree
Date: Mon, 23 Aug 2021 17:50:27 +1000	[thread overview]
Message-ID: <20210823175027.3f3fabd7@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2538 bytes --]

Hi all,

After merging the hmm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/gpu/drm/i915/gem/i915_gem_ttm.c: In function 'i915_ttm_tt_get_st':
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:396:7: error: implicit declaration of function '__sg_alloc_table_from_pages'; did you mean 'sg_alloc_table_from_pages'? [-Werror=implicit-function-declaration]
  396 |  sg = __sg_alloc_table_from_pages
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |       sg_alloc_table_from_pages
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:396:5: warning: assignment to 'struct scatterlist *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  396 |  sg = __sg_alloc_table_from_pages
      |     ^

Caused by commit

  fcbfe956561b ("lib/scatterlist: Provide a dedicated function to support table append")

interacting with commit

  213d50927763 ("drm/i915/ttm: Introduce a TTM i915 gem object backend")

from the drm tree.

I have applied the following merge resolution patch.

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
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ 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);
 	}
 
 	ret = dma_map_sgtable(i915_tt->dev, st, DMA_BIDIRECTIONAL, 0);
-- 
2.32.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2021-08-23  7:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23  7:50 Stephen Rothwell [this message]
2021-08-23 17:33 ` linux-next: build failure after merge of the hmm tree Jason Gunthorpe
2021-09-01 22:01 ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2020-10-06  9:35 Stephen Rothwell
2020-10-06 16:41 ` Jason Gunthorpe
2020-10-12  4:19   ` Stephen Rothwell
2020-10-15 21:11     ` Stephen Rothwell
2019-07-01 11:33 Stephen Rothwell
2019-07-01 23:10 ` Jason Gunthorpe
2019-07-03  1:28   ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210823175027.3f3fabd7@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jgg@mellanox.com \
    --cc=jgg@nvidia.com \
    --cc=jgg@ziepe.ca \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maorg@nvidia.com \
    --cc=thomas.hellstrom@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).