On Fri, Jun 1, 2018 at 5:18 PM, Christian König christian.koenig@amd.com wrote:
Am 31.05.2018 um 07:07 schrieb Souptick Joarder:
On Thu, May 24, 2018 at 12:25 AM, Souptick Joarder jrdr.linux@gmail.com wrote:
Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type.
Ref-> commit 1c8f422059ae ("mm: change return type to vm_fault_t")
Previously vm_insert_{mixed,pfn} returns err which driver mapped into VM_FAULT_* type. The new function vmf_insert_{mixed,pfn} will replace this inefficiency by returning VM_FAULT_* type.
Signed-off-by: Souptick Joarder jrdr.linux@gmail.com
drivers/gpu/drm/ttm/ttm_bo_vm.c | 45 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 23 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 8eba95b..2d13f03 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c @@ -43,10 +43,11 @@
#define TTM_BO_VM_NUM_PREFAULT 16
-static int ttm_bo_vm_fault_idle(struct ttm_buffer_object *bo, +static vm_fault_t ttm_bo_vm_fault_idle(struct ttm_buffer_object *bo, struct vm_fault *vmf) {
int ret = 0;
int err = 0;
vm_fault_t ret = 0;
Please keep reverse xmas tree order for variable declarations.
Except for that it looks good to me, Christian.
Sure, I will send v2. We would like to get this patch in queue for 4.18.