lkml.org 
[lkml]   [2018]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/5] drm/vgem: Indent switch and case at the same level
This patch fixes the checkpatch.pl errors:

vgem_drv.c:97: ERROR: switch and case should be at the same indent
vgem_drv.c:97: ERROR: trailing statements should be on next line

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
---
drivers/gpu/drm/vgem/vgem_drv.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index 2524ff116f00..5767030d04a8 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -94,7 +94,8 @@ static int vgem_gem_fault(struct vm_fault *vmf)
if (!IS_ERR(page)) {
vmf->page = page;
ret = 0;
- } else switch (PTR_ERR(page)) {
+ } else {
+ switch (PTR_ERR(page)) {
case -ENOSPC:
case -ENOMEM:
ret = VM_FAULT_OOM;
@@ -110,8 +111,8 @@ static int vgem_gem_fault(struct vm_fault *vmf)
WARN_ON(PTR_ERR(page));
ret = VM_FAULT_SIGBUS;
break;
+ }
}
-
}
return ret;
}
--
2.16.2
\
 
 \ /
  Last update: 2018-03-08 03:03    [W:0.044 / U:3.948 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site