LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sean Paul <seanpaul@chromium.org>
To: Souptick Joarder <jrdr.linux@gmail.com>
Cc: Gustavo Padovan <gustavo@padovan.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Sean Paul <seanpaul@chromium.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH] gpu: drm: vgem: Change return type to vm_fault_t
Date: Thu, 10 May 2018 14:51:38 -0400 [thread overview]
Message-ID: <20180510185138.GL33053@art_vandelay> (raw)
In-Reply-To: <CAFqt6zZ6VaPXoPs+3exLjNZ6yzS=v9=2TMXdFqHf_Zv5zEvSAA@mail.gmail.com>
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 <jrdr.linux@gmail.com> wrote:
> > Use new return type vm_fault_t for fault handler.
> >
> > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> > Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
> > ---
> > 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 <seanpaul@chromium.org>
--
Sean Paul, Software Engineer, Google / Chromium OS
next prev parent reply other threads:[~2018-05-10 18:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-16 15:02 [PATCH] gpu: drm: vgem: Change return type to vm_fault_t Souptick Joarder
2018-05-10 14:28 ` Souptick Joarder
2018-05-10 18:51 ` Sean Paul [this message]
2018-05-14 16:26 ` Daniel Vetter
2018-05-23 9:35 ` Souptick Joarder
2018-05-24 12:57 ` Daniel Vetter
2018-05-24 14:21 ` Souptick Joarder
2018-05-29 6:44 ` Daniel Vetter
2018-05-29 8:04 ` Souptick Joarder
2018-06-18 11:26 ` Souptick Joarder
2018-06-18 16:00 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180510185138.GL33053@art_vandelay \
--to=seanpaul@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=jrdr.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).