dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: Jonathan Gray <jsg@jsg.id.au>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm] amdgpu: use EINVAL instead of EBADMSG in amdgpu_bo_cpu_unmap()
Date: Tue, 1 Sep 2015 15:07:21 +0200	[thread overview]
Message-ID: <55E5A309.2010709@vodafone.de> (raw)
In-Reply-To: <1441107439-30944-1-git-send-email-jsg@jsg.id.au>

On 01.09.2015 13:37, Jonathan Gray wrote:
> EBADMSG is a streams errno.  OpenBSD does not implement streams and does
> include the streams errnos, this commit fixes the build on OpenBSD.
>
> None of the callers of this function check the return value for -EBADMSG.
>
> Signed-off-by: Jonathan Gray <jsg@jsg.id.au>

Probably not intentional to use this error code here.

Patch is Reviewed-by: Christian König <christian.koenig@amd.com>

Regards,
Christian.

> ---
>   amdgpu/amdgpu_bo.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
> index 220422d..348da00 100644
> --- a/amdgpu/amdgpu_bo.c
> +++ b/amdgpu/amdgpu_bo.c
> @@ -482,7 +482,7 @@ int amdgpu_bo_cpu_unmap(amdgpu_bo_handle bo)
>   	if (bo->cpu_map_count == 0) {
>   		/* not mapped */
>   		pthread_mutex_unlock(&bo->cpu_access_mutex);
> -		return -EBADMSG;
> +		return -EINVAL;
>   	}
>   
>   	bo->cpu_map_count--;

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-09-01 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-01 11:37 [PATCH libdrm] amdgpu: use EINVAL instead of EBADMSG in amdgpu_bo_cpu_unmap() Jonathan Gray
2015-09-01 13:07 ` Christian König [this message]
2015-09-02 20:24   ` 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=55E5A309.2010709@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsg@jsg.id.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