Received: by 10.192.165.148 with SMTP id m20csp1512103imm; Thu, 10 May 2018 11:53:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr4tQrYgpxhgUoaXjyvT7O5N0mJhbTbj0zKSFYv9162dJErbQf81ZeJXRnfcMz6opCUrGZ2 X-Received: by 2002:a17:902:7487:: with SMTP id h7-v6mr2364881pll.154.1525978394199; Thu, 10 May 2018 11:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525978394; cv=none; d=google.com; s=arc-20160816; b=gY2+x7pAbqoJ9i59E0Wjd+6G0Qa/SlpfA4TgcfzK3IDj3ECYW7zLLzS/faiXvyvnW+ 2xCAH1xEYQ5qbdag06lbzsM/2t+lDF+UHzBwX3shQ/eetPWpmxv6Oylc/OdNG9/0cuwI nReBiLPwHanc9M303OfI93lb8WlJrJhUAiRCJTNQ2u6mBDRpc95a5WwdCIBC4TyzD82t 12u3latP1ZY2ovMyk5RArfR/mSEf2A+1GfljTnU82Ofe5LdVCfNx4UMn3CadlEk6C8ja P9p7+n5gKAK/XxBfDqlhoUbzuk1Mz7nmWB7TWHP2D3QmMEomdkN1hnOCQUxjd6gavixr no9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=GVA5J5XkVs2GrcADyHR3fvJzEPY/1Lp8FrM4MF3lYn0=; b=xOo649OhwSTuY/PqOBBKsYwM+M12fsCkFA6NDUF/GTnOjSK7oSnOgEjIxLgo/wcTVv ZoaVGkFrNkmF41MsHYcml3LNmWbYn4rOkHqvKLmMzMGjg1lTVRYi/4RUeIQNYB18vg24 r9Y029clr7NArKI89IrBVUqb9Bed7QLEJEfMoCyTLJx4jmnOtklgpoDCI3ckzTmfkfsG 1WpdwGSgr+swhoumnGc3VmEsP/2V8xqVM8Rw9ocT8/J8VXRqLfVQXh7gCtFIWy1JJUIW r37iu0pxgUSvBMZB8UywngLB2XVYwIXiDKFVklUi1tovZiPOEBnWTYp3ubk9XP3wHFwA QjEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ew9HcWTT; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x187-v6si1167910pgb.335.2018.05.10.11.52.58; Thu, 10 May 2018 11:53:14 -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=@chromium.org header.s=google header.b=ew9HcWTT; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751901AbeEJSvk (ORCPT + 99 others); Thu, 10 May 2018 14:51:40 -0400 Received: from mail-yb0-f195.google.com ([209.85.213.195]:47016 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750972AbeEJSvj (ORCPT ); Thu, 10 May 2018 14:51:39 -0400 Received: by mail-yb0-f195.google.com with SMTP id f3-v6so992907ybg.13 for ; Thu, 10 May 2018 11:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GVA5J5XkVs2GrcADyHR3fvJzEPY/1Lp8FrM4MF3lYn0=; b=ew9HcWTTn3AVAlilfol0mkF/0rqq77k6nmbSNoH1ks4ZDCYMytW3x8bP/SH+/DZF+2 JZdRmwF5FW83SSBm2X5ABDJa8UYXqG8XWdWwIh0IXnROeXuNYSCEzkIE3qvuJS28+GYl zcrGOKbvTjJNowbqyN16resH6UtAqihEtQLDg= 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GVA5J5XkVs2GrcADyHR3fvJzEPY/1Lp8FrM4MF3lYn0=; b=e5zFs0hLeXE3ufpMuWqHYcps56BLC7MZF3Zke5CSCxo6oDqtrtYtZZpGAbwCdWeaNF kuGBaxvG7B4OaiClgfxRGzwb9OYdt9aYBglFW+Y7dUagxAChV+pFJ4BYOAEHg1tAcRdg TqvMZb0VZPIjYLlrdNxfRDTfYmPFuCOydtXakk+U0N7gGmAStFRObM3Xxaty/P/2edgy 8BQNiqyErXOUf5sJzia2j+ow6BeP1VHKNPue96HGVFsybzeH/MUdgyRW69uenJyLoIZ1 accuxrNSXWF4CuZ9Rao+baJwBz8u+GZsUxvCLK901E5hXLjeqeP09/FGI4tfN4YE2cUu oKLg== X-Gm-Message-State: ALKqPwcRCNkb2d7QHviAPPrdnwRTWXNLT/EHiFQFYpBNEOqL4FU5VkS1 3J6e8OPBzwxG0RiEWTd8seIU4g== X-Received: by 2002:a25:46d5:: with SMTP id t204-v6mr1468826yba.297.1525978299104; Thu, 10 May 2018 11:51:39 -0700 (PDT) Received: from localhost ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id x125-v6sm518821ywf.106.2018.05.10.11.51.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 11:51:38 -0700 (PDT) Date: Thu, 10 May 2018 14:51:38 -0400 From: Sean Paul To: Souptick Joarder Cc: Gustavo Padovan , Maarten Lankhorst , Sean Paul , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Matthew Wilcox Subject: Re: [PATCH] gpu: drm: vgem: Change return type to vm_fault_t Message-ID: <20180510185138.GL33053@art_vandelay> References: <20180416150232.GA26745@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 10, 2018 at 07:58:11PM +0530, Souptick Joarder wrote: > Hi Sean, > > On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder wrote: > > 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 > > > > Any further comment on this patch ? Patch looks good to me. My build test fails, though, since vm_fault_t doesn't exist in drm-misc-next yet. So, for now, Reviewed-by: Sean Paul -- Sean Paul, Software Engineer, Google / Chromium OS