Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4645209imm; Mon, 14 May 2018 10:27:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqEBHqMaJ/a9X8dB0JQ2l959cjC9e0qoJxRu9N0RPPUhccK40bxjXwkHEtsiDP+o40OJaQo X-Received: by 2002:a62:c898:: with SMTP id i24-v6mr11511298pfk.35.1526318874011; Mon, 14 May 2018 10:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526318873; cv=none; d=google.com; s=arc-20160816; b=MHOV8nEWXqoas22Y6OeM3Yyt+SrSL2Ec+bvpuMvywmkjeFuTPeavsaQ13DUUA9DiEi 3hU2jYgLXSDQ8/hyUMoySjAtQ84RE7H26wwDjVG9tR9U96kn/Ya4lVLme/o0baRwbQ/J VH3vV59JRG9PStcgisiUR1bQHZMrXeLXa0KpYFK4M3PQGLWSixw1ODS4kznP8YBSRB4Q cVq1al1Yb5QLPIscYs7SL8aLxT1kOJDu3teEe/ePbV5Td5dFXEI5x6IPCVD2SR4Sr8PD iI4cCLpXiau4C5kFMcquEtoMRFXwJg2IsjdRDELAxoiaCoyZ1vRCOnSlwf5EJjX2r8FM oNDQ== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=qTobBV+gqsQEXLmFHAe5Lj3PfWv8R1C+O47TE2y1PC8=; b=Qi4Z5Fe+DeH1tcYg0sFs9FrWL5ZeHzLiOmc2TAjVrNP64i32vduXT8XWbK62Z5Bain hWh3XS+3fUhMsfp/pgeBz7KMmQPypEHnUOkn12F27X9ycyDVSd49WgiqCbnyn+k1yVOc 0JMAunhPYMtxU5NLXKneReMv5WHB9+X+DdM9qpHo484u02sfdO5zItHwCME4+Za0hdAL 7kjywJVXeP79/CQE9V6fOSz6IbDfvCSqgXfq4U5AB/0ajmkSV5hvx69PZrK+TAkoV71+ TJr4uvRaWaX9uBXaKWim7ymPh17e+tJ7EbJ3MQ6mHAUNAbOD+qNFwWNFr4RCWXp73WDn 0VPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=T+UOrYTl; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p66-v6si9591169pfg.329.2018.05.14.10.27.39; Mon, 14 May 2018 10:27:53 -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=fail header.i=@ffwll.ch header.s=google header.b=T+UOrYTl; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753293AbeENQ0W (ORCPT + 99 others); Mon, 14 May 2018 12:26:22 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:40816 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752956AbeENQ0V (ORCPT ); Mon, 14 May 2018 12:26:21 -0400 Received: by mail-wm0-f65.google.com with SMTP id j5-v6so16372895wme.5 for ; Mon, 14 May 2018 09:26:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=qTobBV+gqsQEXLmFHAe5Lj3PfWv8R1C+O47TE2y1PC8=; b=T+UOrYTlP/janFDuW5lueg9WNRDno8LHKt9efAcVV4sYX5uF8xABQKWOvVU52otACq c1TePqjjxzZGY9RFtlicGqsLmRX5qjOh+fxEK5dpDjladw2Muwh/kthJkqwc0mjP99rK ehmz1fUPO/clajQsCX+plJYZC8uvdNp3Yq+Ag= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=qTobBV+gqsQEXLmFHAe5Lj3PfWv8R1C+O47TE2y1PC8=; b=h5JHSQ7FfznTySDkR8h55SyhziX2ZZ80zKiwjLhaU5PHEWZY7IIh45YPMaHodkTJ99 vt559Ep0wiPI2I+xss/Ao19/u8wl3dtYNlqB3Lmdl4cu/Pj0sZK2lN/teHW23LSBAhLl ojXNC/Mc2JmuKVYlfFvoNCAfNkE1VJQH4IkjzzTBkWScjM31iouzhhXZ014H72vDEBjK oOfATqqOMZggLkfBIkEIlmQfaD56HdwKJCsFEtqtk4DANjt6y+PmMWUDPJpmpxSb+0aK wQhiLJ9LWd2IiPjUmV6rzYbIRL1BqmVPmpKkbKHlrMb0USdHqsi/WcQfeeYpQSsJxJZb oN3A== X-Gm-Message-State: ALKqPwf4DfRMuIot/CB3WbH3MUzn7RhqWhPd6HgcjBqH7pFv+PTuE5xD J3pgKokxqBq+8kA+mY89dWCyZtJB X-Received: by 2002:a50:b36a:: with SMTP id r39-v6mr13768181edd.145.1526315180202; Mon, 14 May 2018 09:26:20 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5635:0:39d2:f87e:2033:9f6]) by smtp.gmail.com with ESMTPSA id k7-v6sm5034948edn.74.2018.05.14.09.26.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 May 2018 09:26:19 -0700 (PDT) Date: Mon, 14 May 2018 18:26:17 +0200 From: Daniel Vetter To: Sean Paul Cc: Souptick Joarder , linux-kernel@vger.kernel.org, Matthew Wilcox , dri-devel@lists.freedesktop.org Subject: Re: [PATCH] gpu: drm: vgem: Change return type to vm_fault_t Message-ID: <20180514162617.GD28661@phenom.ffwll.local> Mail-Followup-To: Sean Paul , Souptick Joarder , linux-kernel@vger.kernel.org, Matthew Wilcox , dri-devel@lists.freedesktop.org References: <20180416150232.GA26745@jordon-HP-15-Notebook-PC> <20180510185138.GL33053@art_vandelay> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180510185138.GL33053@art_vandelay> X-Operating-System: Linux phenom 4.15.0-3-amd64 User-Agent: Mutt/1.9.5 (2018-04-13) 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 02:51:38PM -0400, Sean Paul wrote: > 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. vm_fault_t is already in upstream, just needs Maarten to do a backmerge. Which I think he's done by now ... Otherwise nag him more :-) -Daniel > > So, for now, > > Reviewed-by: Sean Paul > > > -- > Sean Paul, Software Engineer, Google / Chromium OS > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch