From: Sean Paul <seanpaul@chromium.org>
To: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: linux-kernel@vger.kernel.org,
Daniel Vetter <daniel.vetter@intel.com>,
David Airlie <airlied@linux.ie>,
Jani Nikula <jani.nikula@linux.intel.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: remove unnecessary fault wrappers
Date: Mon, 30 Jan 2017 15:30:35 -0500 [thread overview]
Message-ID: <20170130203035.GS20076@art_vandelay> (raw)
In-Reply-To: <1485804002-27363-1-git-send-email-ross.zwisler@linux.intel.com>
On Mon, Jan 30, 2017 at 12:20:02PM -0700, Ross Zwisler wrote:
> The fault wrappers drm_vm_fault(), drm_vm_shm_fault(), drm_vm_dma_fault()
> and drm_vm_sg_fault() used to provide extra logic beyond what was in the
> "drm_do_*" versions of these functions, but as of this commit:
>
> commit ca0b07d9a969 ("drm: convert drm from nopage to fault.")
>
> They are just unnecessary wrappers that do nothing. Remove them.
Can we rename the drm_do_* functions to remove "do_" instead? I don't think it
adds anything and this seems like a good time to fix that.
Sean
>
> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
> ---
> drivers/gpu/drm/drm_vm.c | 28 ++++------------------------
> 1 file changed, 4 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
> index bae6e26..e677b11 100644
> --- a/drivers/gpu/drm/drm_vm.c
> +++ b/drivers/gpu/drm/drm_vm.c
> @@ -349,50 +349,30 @@ static int drm_do_vm_sg_fault(struct vm_fault *vmf)
> return 0;
> }
>
> -static int drm_vm_fault(struct vm_fault *vmf)
> -{
> - return drm_do_vm_fault(vmf);
> -}
> -
> -static int drm_vm_shm_fault(struct vm_fault *vmf)
> -{
> - return drm_do_vm_shm_fault(vmf);
> -}
> -
> -static int drm_vm_dma_fault(struct vm_fault *vmf)
> -{
> - return drm_do_vm_dma_fault(vmf);
> -}
> -
> -static int drm_vm_sg_fault(struct vm_fault *vmf)
> -{
> - return drm_do_vm_sg_fault(vmf);
> -}
> -
> /** AGP virtual memory operations */
> static const struct vm_operations_struct drm_vm_ops = {
> - .fault = drm_vm_fault,
> + .fault = drm_do_vm_fault,
> .open = drm_vm_open,
> .close = drm_vm_close,
> };
>
> /** Shared virtual memory operations */
> static const struct vm_operations_struct drm_vm_shm_ops = {
> - .fault = drm_vm_shm_fault,
> + .fault = drm_do_vm_shm_fault,
> .open = drm_vm_open,
> .close = drm_vm_shm_close,
> };
>
> /** DMA virtual memory operations */
> static const struct vm_operations_struct drm_vm_dma_ops = {
> - .fault = drm_vm_dma_fault,
> + .fault = drm_do_vm_dma_fault,
> .open = drm_vm_open,
> .close = drm_vm_close,
> };
>
> /** Scatter-gather virtual memory operations */
> static const struct vm_operations_struct drm_vm_sg_ops = {
> - .fault = drm_vm_sg_fault,
> + .fault = drm_do_vm_sg_fault,
> .open = drm_vm_open,
> .close = drm_vm_close,
> };
> --
> 2.7.4
--
Sean Paul, Software Engineer, Google / Chromium OS
next prev parent reply other threads:[~2017-01-30 20:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-30 19:20 [PATCH] drm: remove unnecessary fault wrappers Ross Zwisler
2017-01-30 20:30 ` Sean Paul [this message]
2017-01-30 22:09 ` [PATCH v2] " Ross Zwisler
2017-01-30 22:14 ` Ross Zwisler
2017-01-31 8:40 ` Daniel Vetter
2017-01-31 14:43 ` Sean Paul
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=20170130203035.GS20076@art_vandelay \
--to=seanpaul@chromium.org \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ross.zwisler@linux.intel.com \
/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).