From patchwork Mon Apr 16 15:02:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10344487 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 A351E601D7 for ; Tue, 17 Apr 2018 07:41:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9690B287D0 for ; Tue, 17 Apr 2018 07:41:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A9E7288D7; Tue, 17 Apr 2018 07:41:53 +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 E1D28287D0 for ; Tue, 17 Apr 2018 07:41:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 415CF6E42A; Tue, 17 Apr 2018 07:41:48 +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 C18FE6E2C2 for ; Mon, 16 Apr 2018 15:00:40 +0000 (UTC) Received: by mail-pf0-x244.google.com with SMTP id g14so10666896pfh.3 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=tGmy7dtSQNmNU6jTDQizgjC4QztinFQnr5r/ld6s8gV/5ggxdAaqEmBL5z2+I9Y+xz hMbIUKlaWsEOWsp0jM1goi4p/PmoEmf0TJnL+N089fphUb8r/Tmvs0sFtOFwhls5fsty DAtNgiLzCfCCSNVq2FDCuyQ5weYjbm/9ipSNon8opfVSGTB/haNhO5uUiRDh78JGUHCU UTGjydg4U2aafUYKyHTyBYILoC8tpZxyAkgJy2JWd8tRUCgCD3l/IG/9CjwBHsywcwn6 wtHNHQFZldTbitGqVL2YI3p4C9IsTsloqDoEJUniA8sHfoLXI3koxU04JT/IJebRgQfI AEcQ== X-Gm-Message-State: ALQs6tAxyR4xjXh7OET8mGDQnfKvZ0Ve74KgrurAN+l/b2ZoU6ZmZlmT a4bCvDRWTdf2ayDhrdj2e6w= X-Google-Smtp-Source: AIpwx49kb5qbulTMMz9Cz3uLt4qkBFO6T4UT0kyRShkDrI9dilegMo14/fGAA+DegnKnhTXiOlkPXQ== 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 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-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Tue, 17 Apr 2018 07:41:47 +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. Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox Reviewed-by: Sean Paul --- 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]);