Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
[firefly-linux-kernel-4.4.55.git] / drivers / staging / android / ashmem.c
index 8c7852742f4bc52fe52381043808268a63e3180f..d140b733940cc3ffd8ea567bb286aa4ed50ac8f4 100644 (file)
@@ -447,8 +447,8 @@ ashmem_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
                loff_t end = (range->pgend + 1) * PAGE_SIZE;
 
                vfs_fallocate(range->asma->file,
-                               FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
-                               start, end - start);
+                             FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
+                             start, end - start);
                range->purged = ASHMEM_WAS_PURGED;
                lru_del(range);
 
@@ -549,7 +549,6 @@ static int get_name(struct ashmem_area *asma, void __user *name)
 
        mutex_lock(&ashmem_mutex);
        if (asma->name[ASHMEM_NAME_PREFIX_LEN] != '\0') {
-
                /*
                 * Copying only `len', instead of ASHMEM_NAME_LEN, bytes
                 * prevents us from revealing one user's stack to another.
@@ -751,10 +750,10 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
        switch (cmd) {
        case ASHMEM_SET_NAME:
-               ret = set_name(asma, (void __user *) arg);
+               ret = set_name(asma, (void __user *)arg);
                break;
        case ASHMEM_GET_NAME:
-               ret = get_name(asma, (void __user *) arg);
+               ret = get_name(asma, (void __user *)arg);
                break;
        case ASHMEM_SET_SIZE:
                ret = -EINVAL;
@@ -775,7 +774,7 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        case ASHMEM_PIN:
        case ASHMEM_UNPIN:
        case ASHMEM_GET_PIN_STATUS:
-               ret = ashmem_pin_unpin(asma, cmd, (void __user *) arg);
+               ret = ashmem_pin_unpin(asma, cmd, (void __user *)arg);
                break;
        case ASHMEM_PURGE_ALL_CACHES:
                ret = -EPERM;
@@ -798,7 +797,6 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 static long compat_ashmem_ioctl(struct file *file, unsigned int cmd,
                                unsigned long arg)
 {
-
        switch (cmd) {
        case COMPAT_ASHMEM_SET_SIZE:
                cmd = ASHMEM_SET_SIZE;