Commit 8f526e12 authored by Ross Zwisler's avatar Ross Zwisler Committed by Linus Torvalds

drm: remove unnecessary fault wrappers

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
commit ca0b07d9 ("drm: convert drm from nopage to fault") they are
just unnecessary wrappers that do nothing.

Remove them, and rename the the drm_do_* fault handlers to remove the
"do_" since they no longer have corresponding wrappers.

Link: http://lkml.kernel.org/r/1486155698-25717-1-git-send-email-ross.zwisler@linux.intel.comSigned-off-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 166f61b9
...@@ -96,7 +96,7 @@ static pgprot_t drm_dma_prot(uint32_t map_type, struct vm_area_struct *vma) ...@@ -96,7 +96,7 @@ static pgprot_t drm_dma_prot(uint32_t map_type, struct vm_area_struct *vma)
* map, get the page, increment the use count and return it. * map, get the page, increment the use count and return it.
*/ */
#if IS_ENABLED(CONFIG_AGP) #if IS_ENABLED(CONFIG_AGP)
static int drm_do_vm_fault(struct vm_fault *vmf) static int drm_vm_fault(struct vm_fault *vmf)
{ {
struct vm_area_struct *vma = vmf->vma; struct vm_area_struct *vma = vmf->vma;
struct drm_file *priv = vma->vm_file->private_data; struct drm_file *priv = vma->vm_file->private_data;
...@@ -169,7 +169,7 @@ static int drm_do_vm_fault(struct vm_fault *vmf) ...@@ -169,7 +169,7 @@ static int drm_do_vm_fault(struct vm_fault *vmf)
return VM_FAULT_SIGBUS; /* Disallow mremap */ return VM_FAULT_SIGBUS; /* Disallow mremap */
} }
#else #else
static int drm_do_vm_fault(struct vm_fault *vmf) static int drm_vm_fault(struct vm_fault *vmf)
{ {
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
...@@ -185,7 +185,7 @@ static int drm_do_vm_fault(struct vm_fault *vmf) ...@@ -185,7 +185,7 @@ static int drm_do_vm_fault(struct vm_fault *vmf)
* Get the mapping, find the real physical page to map, get the page, and * Get the mapping, find the real physical page to map, get the page, and
* return it. * return it.
*/ */
static int drm_do_vm_shm_fault(struct vm_fault *vmf) static int drm_vm_shm_fault(struct vm_fault *vmf)
{ {
struct vm_area_struct *vma = vmf->vma; struct vm_area_struct *vma = vmf->vma;
struct drm_local_map *map = vma->vm_private_data; struct drm_local_map *map = vma->vm_private_data;
...@@ -287,7 +287,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma) ...@@ -287,7 +287,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
* *
* Determine the page number from the page offset and get it from drm_device_dma::pagelist. * Determine the page number from the page offset and get it from drm_device_dma::pagelist.
*/ */
static int drm_do_vm_dma_fault(struct vm_fault *vmf) static int drm_vm_dma_fault(struct vm_fault *vmf)
{ {
struct vm_area_struct *vma = vmf->vma; struct vm_area_struct *vma = vmf->vma;
struct drm_file *priv = vma->vm_file->private_data; struct drm_file *priv = vma->vm_file->private_data;
...@@ -322,7 +322,7 @@ static int drm_do_vm_dma_fault(struct vm_fault *vmf) ...@@ -322,7 +322,7 @@ static int drm_do_vm_dma_fault(struct vm_fault *vmf)
* *
* Determine the map offset from the page offset and get it from drm_sg_mem::pagelist. * Determine the map offset from the page offset and get it from drm_sg_mem::pagelist.
*/ */
static int drm_do_vm_sg_fault(struct vm_fault *vmf) static int drm_vm_sg_fault(struct vm_fault *vmf)
{ {
struct vm_area_struct *vma = vmf->vma; struct vm_area_struct *vma = vmf->vma;
struct drm_local_map *map = vma->vm_private_data; struct drm_local_map *map = vma->vm_private_data;
...@@ -349,26 +349,6 @@ static int drm_do_vm_sg_fault(struct vm_fault *vmf) ...@@ -349,26 +349,6 @@ static int drm_do_vm_sg_fault(struct vm_fault *vmf)
return 0; 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 */ /** AGP virtual memory operations */
static const struct vm_operations_struct drm_vm_ops = { static const struct vm_operations_struct drm_vm_ops = {
.fault = drm_vm_fault, .fault = drm_vm_fault,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment