Received: by 10.192.165.148 with SMTP id m20csp1222784imm; Thu, 10 May 2018 07:29:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoSR13LC8Q40CGrPP1od5jh4Bb01a3cbPwfvZu2abSP7GzPohKXgKJENYrPhLD1IImjpefZ X-Received: by 2002:a17:902:b189:: with SMTP id s9-v6mr1632732plr.352.1525962570154; Thu, 10 May 2018 07:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525962570; cv=none; d=google.com; s=arc-20160816; b=TzZ47FU/KtrBlcz5rl9iJ6tjY/vuyhRFOxOAGwnfz6aUJuLYHO2P2BMBeL7sYBB+xM 4dGAtZyZ+JHUB4SO+QPayhLEyM+SAyRgWAnKJn39bNX5I0yAHFCynIoI9lluh6oQCzxk B13e9z/cStJIVc8Q4UKQzVDDfQp8BNmPLA8v7bXBYJWIWoo8pwgy3jGVSO4XS/rHHUga Lz3R5KzSMbzgkY/1vCV0g8AK5QzhuaY0HxD0pJ1ujV7XwRhI0guLdnjQaFxAIg58Camt 6ZU1o/KnpWPqNeY5kjlFz70DUUfOBk4LBcEUt8djm4pPmwf+ZJmQT+hyU3Phx3Ia1qYB jIWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=eaPzQXlnJcxZP2KUKuUy6XrnkiGPcPiFld6sJjBPp1g=; b=Z3ySK6PbGikc+zw1SCLLXoO/CEEY6de+DWF/nTpX4EHyFEKuQZ0SkE4If6ZbyVm+03 66RrtjOlcvlFPskEoEHLR0kINcAHFNpwtSaGCgqwetiI39XuWanS2yg1EeveXT2Hkjee R5ygnHMzNVRPgiCgf0bjHlE/3LTq0HRoHg1D9c1wCXJ6BOoj3XwIiBeArgxcgLLCrWK9 QtzWxcbRlONXi3oPsZZNbiTihhrE7jWvTEWp7AZHrasUvCwluIfnH+sQtLDDp0aWKKja unDyLCZ3JZf7gcGSgygl1RKSvqbs7RMj5JLSbcIg6ld00rna2UTq+IYNyj4ENvzKnnPI bG1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SQzfJOdJ; 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 p3-v6si867654pff.356.2018.05.10.07.29.15; Thu, 10 May 2018 07:29: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=SQzfJOdJ; 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 S966042AbeEJO2O (ORCPT + 99 others); Thu, 10 May 2018 10:28:14 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:32878 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935632AbeEJO2N (ORCPT ); Thu, 10 May 2018 10:28:13 -0400 Received: by mail-lf0-f68.google.com with SMTP id h9-v6so2281494lfi.0 for ; Thu, 10 May 2018 07:28:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=eaPzQXlnJcxZP2KUKuUy6XrnkiGPcPiFld6sJjBPp1g=; b=SQzfJOdJZ+2Nu4SU7ucHpmj2GnDhOF6aYvmftCJQyN8MAg5AFnCeFernNgRoTd4dMY 3HswKqauEvEDyeT3m6CB2VhbzXGTJsKYAS/85k6Rk6xg1gNKzFlGuVTc2DUJxh3jXTAH OlmpCCmrAKYn/LwqqPrMCz4FDh0b6wm0vtlqmTADHzKycRULlZ5D9j46LtJp/DY05dwM aLn6ufhc5x8d5/sx4oNUKRRkzF3Mw1Se/gd+dOmsvxFVVQUP91Fxcp23ES4BDvgAJ2Ls bfOqhMc7bmhk8zsNguENc4QUV2V8yNGw6sGrmeA9g0fFn7BPf0lBKCGQtzY0YsX2458Z ewAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=eaPzQXlnJcxZP2KUKuUy6XrnkiGPcPiFld6sJjBPp1g=; b=LhQ3Wmly8D3RYf0Ofg8/VQM/7jIh2KaKzDfkGEktqba6xnEuw/BVZR1V5QUy2xukwW uwm7d0vZ5j85Er0pxObVBawJo0QTzWBLCZnItI3NnQw+pB6lYRpjQdlDQqGfosigFmDq vMBtnSIedHrdgV0Hxjqr3Ex3fr2gLG254nTjoM23kkwelsCVVpwCTufzDwfuSu5FYC0l Kzx0jwqhQ963bO2bHg7BGqMpP7oM+4Gd9tE/B3ffUq2B8URon3kbUgzK6WMAOwYWsab0 PkqauMmogCDbUH6remZvvs7SnYtbBFfJTdH7CvepDFBHDXmIHe7i6x3ty5joonAiNb5+ UlPA== X-Gm-Message-State: ALKqPwf3y8A3VlUmI2kIfQ/AuAj3bmjYHR7i3vYZXnjQd7gz8QApBlP6 tlKFDzq0laDVKwtgY00A5PrkS/oYQr0fi8ZEbUs= X-Received: by 2002:a2e:934f:: with SMTP id m15-v6mr1306995ljh.39.1525962491841; Thu, 10 May 2018 07:28:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:d885:0:0:0:0:0 with HTTP; Thu, 10 May 2018 07:28:11 -0700 (PDT) In-Reply-To: <20180416150232.GA26745@jordon-HP-15-Notebook-PC> References: <20180416150232.GA26745@jordon-HP-15-Notebook-PC> From: Souptick Joarder Date: Thu, 10 May 2018 19:58:11 +0530 Message-ID: Subject: Re: [PATCH] gpu: drm: vgem: Change return type to vm_fault_t To: Gustavo Padovan , Maarten Lankhorst , Sean Paul Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Matthew Wilcox Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ?