mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Jeremy Cline <jcline@redhat.com>, Huang Rui <ray.huang@amd.com>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/ttm: Fix address passed to dma_mapping_error() in ttm_pool_map()
Date: Mon, 11 Jan 2021 21:21:48 +0100	[thread overview]
Message-ID: <cbd76108-a7c4-119b-b045-eb857a84fcab@amd.com> (raw)
In-Reply-To: <20210111164033.695968-1-jcline@redhat.com>

Am 11.01.21 um 17:40 schrieb Jeremy Cline:
> check_unmap() is producing a warning about a missing map error check.
> The return value from dma_map_page() should be checked for an error, not
> the caller-provided dma_addr.
>
> Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3")
> Signed-off-by: Jeremy Cline <jcline@redhat.com>

Good catch. Reviewed and pushed to drm-misc-fixes, should be in the -rc 
by the weekend.

Thanks for the help,
Christian.

> ---
>   drivers/gpu/drm/ttm/ttm_pool.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
> index 7b2f60616750..0aa197204b08 100644
> --- a/drivers/gpu/drm/ttm/ttm_pool.c
> +++ b/drivers/gpu/drm/ttm/ttm_pool.c
> @@ -190,7 +190,7 @@ static int ttm_pool_map(struct ttm_pool *pool, unsigned int order,
>   		size_t size = (1ULL << order) * PAGE_SIZE;
>   
>   		addr = dma_map_page(pool->dev, p, 0, size, DMA_BIDIRECTIONAL);
> -		if (dma_mapping_error(pool->dev, **dma_addr))
> +		if (dma_mapping_error(pool->dev, addr))
>   			return -EFAULT;
>   	}
>   


  reply	other threads:[~2021-01-11 20:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 16:40 Jeremy Cline
2021-01-11 20:21 ` Christian König [this message]
2021-01-11 20:31   ` Jeremy Cline

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=cbd76108-a7c4-119b-b045-eb857a84fcab@amd.com \
    --to=christian.koenig@amd.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jcline@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ray.huang@amd.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

all inboxes | Powered by JetHome®