Received: by 10.192.165.156 with SMTP id m28csp742456imm; Mon, 16 Apr 2018 08:02:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/q/NBRuajgzUBH4ZYs9pCQS9WjE3hm8Mc8IquTv6pGjnXDrKvzJWA37zN1c7Nf5rP5JmnW X-Received: by 10.98.141.78 with SMTP id z75mr21906716pfd.174.1523890952249; Mon, 16 Apr 2018 08:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523890951; cv=none; d=google.com; s=arc-20160816; b=pKXfBqwPPwiTA40JCFazdG2WTrYBzV1JApiYTEBNuG1UBoAgNNoTJpeWzW0m4Z2Aw5 UhZWEWHzAKma/igZJGukX3Djv485EOyJH4rrqJeImqaCbHaiEhPeCYLYmfGJ2PPqT7Qh O5D5ayoa2FoiCLZDPBgDbbkcKsWaAikKKR+CpKnOpv6slN7rCRFTeS+Pl1y70Kmir1UT UKbjYjYMKGpvzNbUuG3I2B79pOZK9eK0DxsY8iquVQn8Sa8qS2OCJnDZdAvLoLQdyRHt 8EZssyi2y7b4LL2VpJTPy5c0FeHsrjUko7oMDP6kq4I7APiPOkBwv/6pjjhrZQKWXbRB EjVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=iMNR2xrK1ZlWvsIX+lOikqjYAKPgRWd1gQc2zdSUg2A=; b=wf57b61YYiOr0j6pO9gFzhTO0VBTZwOm3rVQNDkkeWrNC2qxtPygcHCuAMW7KxZFYt rseV75/WMWZ17QUtKM0IK/I8Eap8/zQHFHozqUOgRZa+lEv8KqLzSiajrUMnUt/qaR1c 4SlOR/G5Y2L8L70KSJxDNWz9zcGoKigFOc0kMZDaGPbzNPvLk+0wXRd0g1HrVmZ/Lzhy 9V2/5MfL32qljjbPn7btGtCEJFI94JVrqxBi3kP7X1V3F8rp9ZspCpXKHEYAkpxI/QbD +bXmf7/rPfkBB7lvnPYNxWNbJ57wf15tf+79FEQ+bbyBMIonseBTHZmUaGnB12yVuszX q+Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YO6cXAu4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 79si9727673pga.440.2018.04.16.08.02.08; Mon, 16 Apr 2018 08:02:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YO6cXAu4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751876AbeDPPAp (ORCPT + 99 others); Mon, 16 Apr 2018 11:00:45 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35483 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbeDPPAk (ORCPT ); Mon, 16 Apr 2018 11:00:40 -0400 Received: by mail-pf0-f196.google.com with SMTP id j5so1133978pfh.2 for ; Mon, 16 Apr 2018 08:00:40 -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=iMNR2xrK1ZlWvsIX+lOikqjYAKPgRWd1gQc2zdSUg2A=; b=YO6cXAu45EjD7k0f7zIWzpWBntLIV8oaj3V0HBqMpi3EviciZQzYg3F0LZPfYi3Ww+ VeV1/rpFzhQMGO60v6rXZu7yror11xVZM57+y2FREntGvRST6jTccZz/0AsuEieudZZz 9o5mMLbSF4Y8eLjE5JqGFAOxcCi8G8DMRE0wO04bp4dn/mN0cvk33czRSqhbrmsXtCM/ LU+zJ7xkNEz7nAfP00XwmsYrXA4luG6H1sZceOSKzbbwpgb5ZTm8f5jubG8C4rgovdub 5N30s7wS0nor4rsfxg2rvNvf5JSjhUgMbPohdJ7NNZQZTgAijoNS1aQHLnqY+gKGgkcZ 4jlA== 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=iMNR2xrK1ZlWvsIX+lOikqjYAKPgRWd1gQc2zdSUg2A=; b=dOX6LoCe9ZQBCGtJg9xRaWrZlTOKVTA9WPb1L7RRPva8KuhjzNjcRZ/xhEUuJsenpH hu8qT+2ZyFbeW6rjhj4TDX/gRtSaDOG4H01ClOma/bCuDhXbX55tVaUXSoomX3F0a9dU H9LTf8Efn2zY2Xww5R8zzidNZVCkjAjJPke1IIJtk1asu61d1/mkmvSjPIfiIp9O5xRb 8iqDCr9dI6kN0Fyh+S23/iCgAKl51aWoMQRZuB7nfJinekewAQoJxdVSWj/o3VJJWXq1 yRoxShRJ4/uBcpTe3FP32upYQczOODvjOFM7cbyV0hQkgKI2YCV9uK5bJRpW/PqHqCaY DLwg== X-Gm-Message-State: ALQs6tB5VyDjhU9DvnNR46feXK2HmetlU0kKDKLFsLotuRvgbwQY4B+0 qMrcH5+DbxTnwdM9RGb4vrlzzw== X-Received: by 10.98.162.2 with SMTP id m2mr14282269pff.251.1523890840157; Mon, 16 Apr 2018 08:00:40 -0700 (PDT) Received: from jordon-HP-15-Notebook-PC ([49.205.217.195]) by smtp.gmail.com with ESMTPSA id f8sm27255355pgs.84.2018.04.16.08.00.37 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Apr 2018 08:00:38 -0700 (PDT) Date: Mon, 16 Apr 2018 20:32:32 +0530 From: Souptick Joarder To: gustavo@padovan.org, maarten.lankhorst@linux.intel.com, seanpaul@chromium.org Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, willy@infradead.org Subject: [PATCH] gpu: drm: vgem: Change return type to vm_fault_t Message-ID: <20180416150232.GA26745@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use new return type vm_fault_t for fault handler. Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox --- drivers/gpu/drm/vgem/vgem_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c index 2524ff1..c64a859 100644 --- a/drivers/gpu/drm/vgem/vgem_drv.c +++ b/drivers/gpu/drm/vgem/vgem_drv.c @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj) kfree(vgem_obj); } -static int vgem_gem_fault(struct vm_fault *vmf) +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; struct drm_vgem_gem_object *obj = vma->vm_private_data; /* We don't use vmf->pgoff since that has the fake offset */ unsigned long vaddr = vmf->address; - int ret; + vm_fault_t ret = VM_FAULT_SIGBUS; loff_t num_pages; pgoff_t page_offset; page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT; @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf) if (page_offset > num_pages) return VM_FAULT_SIGBUS; - ret = -ENOENT; mutex_lock(&obj->pages_lock); if (obj->pages) { get_page(obj->pages[page_offset]); -- 1.9.1