summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_drm_gem.c
diff options
context:
space:
mode:
authorJoonyoung Shim <jy0922.shim@samsung.com>2015-07-28 11:53:17 +0300
committerInki Dae <inki.dae@samsung.com>2015-08-16 07:26:42 +0300
commit23597e2642ca76883ef533d3e3947b859537fd49 (patch)
treee2d1237c2aa5dcf360a78c8fc5cf4229d1a4c9fc /drivers/gpu/drm/exynos/exynos_drm_gem.c
parent8139951cae69637cc882e23f36fc45ecfa1ec814 (diff)
downloadlinux-23597e2642ca76883ef533d3e3947b859537fd49.tar.xz
drm/exynos: remove function convert_to_vm_err_msg
The convert_to_vm_err_msg is called just once by exynos_drm_gem_fault, so it's simple not to use the function. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_gem.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gem.c34
1 files changed, 10 insertions, 24 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c
index d320acd20986..f717d795e9ae 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
@@ -20,29 +20,6 @@
#include "exynos_drm_buf.h"
#include "exynos_drm_iommu.h"
-static unsigned int convert_to_vm_err_msg(int msg)
-{
- unsigned int out_msg;
-
- switch (msg) {
- case 0:
- case -ERESTARTSYS:
- case -EINTR:
- out_msg = VM_FAULT_NOPAGE;
- break;
-
- case -ENOMEM:
- out_msg = VM_FAULT_OOM;
- break;
-
- default:
- out_msg = VM_FAULT_SIGBUS;
- break;
- }
-
- return out_msg;
-}
-
static int check_gem_flags(unsigned int flags)
{
if (flags & ~(EXYNOS_BO_MASK)) {
@@ -600,7 +577,16 @@ int exynos_drm_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
mutex_unlock(&dev->struct_mutex);
- return convert_to_vm_err_msg(ret);
+ switch (ret) {
+ case 0:
+ case -ERESTARTSYS:
+ case -EINTR:
+ return VM_FAULT_NOPAGE;
+ case -ENOMEM:
+ return VM_FAULT_OOM;
+ default:
+ return VM_FAULT_SIGBUS;
+ }
}
int exynos_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)