All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH libdrm] amdgpu: add error return value for finding bo by cpu mapping
Date: Thu, 30 Aug 2018 17:26:38 +0800	[thread overview]
Message-ID: <5B87B84E.9090307@amd.com> (raw)
In-Reply-To: <01272587-1647-4456-57fa-ad809a100c34-otUistvHUpPR7s880joybQ@public.gmane.org>

On 08/30/2018 04:57 PM, Michel Dänzer wrote:
> On 2018-08-30 10:50 a.m., Junwei Zhang wrote:
>> If nothing is found, error should be returned.
>>
>> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
>>
>> [...]
>>
>> @@ -577,10 +578,11 @@ int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev,
>>   	} else {
>>   		*buf_handle = NULL;
>>   		*offset_in_bo = 0;
>> +		r = -EINVAL;
>
> I think -ENOENT would be better, to differentiate this error from
> passing invalid pointer / size parameters.

Mmm, good point, perhaps ENXIO is better,
which is used in amdgpu ttm for address out of existing range.

#define ENOENT           2      /* No such file or directory */
#define ENXIO            6      /* No such device or address */

Regards,
Jerry

>
> With that,
>
> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      parent reply	other threads:[~2018-08-30  9:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-30  8:50 [PATCH libdrm] amdgpu: add error return value for finding bo by cpu mapping Junwei Zhang
     [not found] ` <1535619003-18067-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2018-08-30  8:54   ` Christian König
2018-08-30  8:57   ` Michel Dänzer
     [not found]     ` <01272587-1647-4456-57fa-ad809a100c34-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-08-30  9:26       ` Zhang, Jerry (Junwei) [this message]

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=5B87B84E.9090307@amd.com \
    --to=jerry.zhang-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=michel-otUistvHUpPR7s880joybQ@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.