linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Dave Airlie <airlied@linux.ie>,
	DRI <dri-devel@lists.freedesktop.org>,
	Leon Romanovsky <leonro@nvidia.com>,
	Maor Gottlieb <maorg@nvidia.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the hmm tree
Date: Tue, 6 Oct 2020 13:41:20 -0300	[thread overview]
Message-ID: <20201006164120.GI4734@nvidia.com> (raw)
In-Reply-To: <20201006203508.3cb3d0e3@canb.auug.org.au>

On Tue, Oct 06, 2020 at 08:35:08PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the hmm tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
> 
> 
> Caused by commit
> 
>   07da1223ec93 ("lib/scatterlist: Add support in dynamic allocation of SG table from pages")
> 
> interacting with commit
> 
>   707d561f77b5 ("drm: allow limiting the scatter list size.")
> 
> from the drm tree.
> 
> I have added the following merge fix patch
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 6 Oct 2020 20:22:51 +1100
> Subject: [PATCH] lib/scatterlist: merge fix for "drm: allow limiting the
>  scatter list size."
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>  drivers/gpu/drm/drm_prime.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
> index 11fe9ff76fd5..83ac901b65a2 100644
> +++ b/drivers/gpu/drm/drm_prime.c
> @@ -807,6 +807,7 @@ struct sg_table *drm_prime_pages_to_sg(struct drm_device *dev,
>  				       struct page **pages, unsigned int nr_pages)
>  {
>  	struct sg_table *sg = NULL;
> +	struct scatterlist *sl;
>  	size_t max_segment = 0;
>  	int ret;
>  
> @@ -820,11 +821,13 @@ struct sg_table *drm_prime_pages_to_sg(struct drm_device *dev,
>  		max_segment = dma_max_mapping_size(dev->dev);
>  	if (max_segment == 0 || max_segment > SCATTERLIST_MAX_SEGMENT)
>  		max_segment = SCATTERLIST_MAX_SEGMENT;
> -	ret = __sg_alloc_table_from_pages(sg, pages, nr_pages, 0,
> +	sl = __sg_alloc_table_from_pages(sg, pages, nr_pages, 0,
>  					  nr_pages << PAGE_SHIFT,
> -					  max_segment, GFP_KERNEL);
> -	if (ret)
> +					  max_segment, NULL, 0, GFP_KERNEL);
> +	if (IS_ERR(sl)) {
> +		ret = PTR_ERR(sl);
>  		goto out;
> +	}
>  
>  	return sg;
>  out:

This looks OK to me, thanks

Jason

  reply	other threads:[~2020-10-06 16:41 UTC|newest]

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

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=20201006164120.GI4734@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=maorg@nvidia.com \
    --cc=sfr@canb.auug.org.au \
    /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).