From patchwork Thu May 10 13:42:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10393355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DC5B2601A0 for ; Fri, 11 May 2018 07:06:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC92128DF5 for ; Fri, 11 May 2018 07:06:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D162E28DF8; Fri, 11 May 2018 07:06:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8893B28DF5 for ; Fri, 11 May 2018 07:06:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2729C6F03A; Fri, 11 May 2018 07:05:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id C8CEA6E1ED for ; Thu, 10 May 2018 13:39:58 +0000 (UTC) Received: by mail-pf0-x244.google.com with SMTP id e9-v6so1103164pfi.4 for ; Thu, 10 May 2018 06:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=ttp+FPai+7+mYZjlCw9IiKeaek1m0/kBUDfSwtmkfLM=; b=t9/3NtVyfVLmsn8IMTEEIk+B0TFmtJb1tMhb+5dZxUKRdyILlQqQ4ZfHepgbJx4BzB y/DGgULYliyDcR8RO2YOmHFMfgklsnSAUW+pWHCnRHNir1wEinRDsVFOz7rOWEKWXPPc w73mHxiBvYrd1ANXkMQ8z19JbMJ2qzocWbwMDWl8Ht2Ikjf+IM3tFDsqddmCVboNJmuK 8OWJKWfWPMfYYgo/pCX2u63/g7BhEYzlPbpkP+NtR+r6cKRg3z3F8UrAF/0LoWQftOj2 34CqI1zaytiBK7jA3+9Ho0Q4C/IhRw/ZriHjWAkm9Eo5crGSKHQ4qtub/51QRSrCX0IY 3REA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=ttp+FPai+7+mYZjlCw9IiKeaek1m0/kBUDfSwtmkfLM=; b=cK3p620Ce4HSNVRS2710K1tycJgIj8Yt7/kGtq16iVtjYObYUx8aRMcTaGmr+T+n5S QKTvxLXBk7OOCik/sbsP2qz8OUDi9lZ94GH25eHVTsfN9NCiib0KcW3yBDLXMSTb4T/Q s+X49lETvfF0FlyawTnjM8oY/1qlBoZ11lFRSYBXbDr+1HpIhHwptn8UJIn2M17kkU/+ wGeuxh0mlfwmRemrM8erKUuGD1Lh/h/uIVEEhPN+3bm/gY7nSpYhJNIujg2Rdd6YVdSO whvIak4/4xEUlfQhWj9wYFPJ7Kfs8DbLbvsPP0S/sEfLqZSQyLXuqZ7bj+R5mQ+TgvX/ 2KeA== X-Gm-Message-State: ALKqPwdPgkC1Ep5ROA/95gbrK+AyOY/TuF8HKAMq7YTvXUPHhLWBw0qH hA5PT1SWxTSwzEflqntruUk= X-Google-Smtp-Source: AB8JxZqqoz5SIPO5IgsbFaF9KM+P5ovQ7oRSAsqsoRnrnrxjZqluMeAx6CxJyPWsZs1az4PjP2fxYg== X-Received: by 2002:a63:86c8:: with SMTP id x191-v6mr1198119pgd.321.1525959598131; Thu, 10 May 2018 06:39:58 -0700 (PDT) Received: from jordon-HP-15-Notebook-PC ([49.205.218.138]) by smtp.gmail.com with ESMTPSA id c11-v6sm2276089pfh.15.2018.05.10.06.39.55 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 May 2018 06:39:56 -0700 (PDT) Date: Thu, 10 May 2018 19:12:04 +0530 From: Souptick Joarder To: daniel.vetter@intel.com, gustavo@padovan.org, seanpaul@chromium.org, airlied@linux.ie Subject: [PATCH] gpu: drm: drm_vm: Adding new typedef vm_fault_t Message-ID: <20180510134203.GA25166@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Fri, 11 May 2018 07:05:50 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: willy@infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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. commit 1c8f422059ae ("mm: change return type to vm_fault_t") Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox --- drivers/gpu/drm/drm_vm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 1.9.1 diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 2660543..c330104 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -100,7 +100,7 @@ static pgprot_t drm_dma_prot(uint32_t map_type, struct vm_area_struct *vma) * map, get the page, increment the use count and return it. */ #if IS_ENABLED(CONFIG_AGP) -static int drm_vm_fault(struct vm_fault *vmf) +static vm_fault_t drm_vm_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; struct drm_file *priv = vma->vm_file->private_data; @@ -173,7 +173,7 @@ static int drm_vm_fault(struct vm_fault *vmf) return VM_FAULT_SIGBUS; /* Disallow mremap */ } #else -static int drm_vm_fault(struct vm_fault *vmf) +static vm_fault_t drm_vm_fault(struct vm_fault *vmf) { return VM_FAULT_SIGBUS; } @@ -189,7 +189,7 @@ static int drm_vm_fault(struct vm_fault *vmf) * Get the mapping, find the real physical page to map, get the page, and * return it. */ -static int drm_vm_shm_fault(struct vm_fault *vmf) +static vm_fault_t drm_vm_shm_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; struct drm_local_map *map = vma->vm_private_data; @@ -291,7 +291,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma) * * Determine the page number from the page offset and get it from drm_device_dma::pagelist. */ -static int drm_vm_dma_fault(struct vm_fault *vmf) +static vm_fault_t drm_vm_dma_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; struct drm_file *priv = vma->vm_file->private_data; @@ -326,7 +326,7 @@ static int drm_vm_dma_fault(struct vm_fault *vmf) * * Determine the map offset from the page offset and get it from drm_sg_mem::pagelist. */ -static int drm_vm_sg_fault(struct vm_fault *vmf) +static vm_fault_t drm_vm_sg_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; struct drm_local_map *map = vma->vm_private_data;