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.zh...@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.daen...@amd.com>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx