staging: android: binder: cleanup some long lines
PATCH 1/4 staging: android: binder: cleanup some long lines
This file has a lot of long line problems due to the massive indent issues that exist. This just cleans up some of the really really long ones.
Signed-off-by Daniel Walker <[email protected]>
--- drivers/staging/android/binder.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-)
drivers/staging/android/binder.c +11 -5
@@ -1308,7 +1308,8 @@ static void binder_transaction_buffer_release(struct binder_proc *proc, buffer->data_size < sizeof(*fp) || !IS_ALIGNED(*offp, sizeof(void *))) {printk (KERN_ERR "binder: transaction release %d bad" -"offset %zd, size %zd\n" , debug_id, *offp, buffer->data_size); +"offset %zd, size %zd\n" , debug_id, + *offp, buffer->data_size);continue ; } fp = (struct flat_binder_object *)(buffer->data + *offp);
@@ -1317,7 +1318,8 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,case BINDER_TYPE_WEAK_BINDER : {struct binder_node *node =binder_get_node (proc, fp->binder);if (node ==NULL ) { -printk (KERN_ERR "binder: transaction release %d bad node %p\n" , debug_id, fp->binder); +printk (KERN_ERR "binder: transaction release %d" +" bad node %p\n" , debug_id, fp->binder);break ; } binder_debug(BINDER_DEBUG_TRANSACTION,
@@ -1329,7 +1331,9 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,case BINDER_TYPE_WEAK_HANDLE : {struct binder_ref *ref =binder_get_ref (proc, fp->handle);if (ref ==NULL ) { -printk (KERN_ERR "binder: transaction release %d bad handle %ld\n" , debug_id, fp->handle); +printk (KERN_ERR "binder: transaction release %d" +" bad handle %ld\n" , debug_id, + fp->handle);break ; } binder_debug(BINDER_DEBUG_TRANSACTION,
@@ -1346,7 +1350,8 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,break ;default : -printk (KERN_ERR "binder: transaction release %d bad object type %lx\n" , debug_id, fp->type); +printk (KERN_ERR "binder: transaction release %d bad " +"object type %lx\n" , debug_id, fp->type);break ; } }
@@ -1599,7 +1604,8 @@ static void binder_transaction(struct binder_proc *proc,else fp->type =BINDER_TYPE_WEAK_HANDLE ; fp->handle = ref->desc; -binder_inc_ref (ref, fp->type ==BINDER_TYPE_HANDLE , &thread->todo); +binder_inc_ref (ref, fp->type ==BINDER_TYPE_HANDLE , + &thread->todo); binder_debug(BINDER_DEBUG_TRANSACTION, " node %d u%p -> ref %d desc %d\n",
Signature · 1 line
1.5.4.3
PATCH 2/4 staging: android: lowmemorykiller: remove a predefine
I moved the struct shrinker down so that the predefine isn't needed.
Signed-off-by Daniel Walker <[email protected]>
--- drivers/staging/android/lowmemorykiller.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
drivers/staging/android/lowmemorykiller.c +5 -6
@@ -19,12 +19,6 @@#include <linux/oom.h> #include <linux/sched.h> -static int lowmem_shrink (int nr_to_scan,gfp_t gfp_mask); - -static struct shrinker lowmem_shrinker = { - .shrink = lowmem_shrink, - .seeks =DEFAULT_SEEKS *16 -};static uint32_t lowmem_debug_level =2 ;static int lowmem_adj[6 ] = {0 ,
@@ -140,6 +134,11 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)return rem; } +static struct shrinker lowmem_shrinker = { + .shrink = lowmem_shrink, + .seeks =DEFAULT_SEEKS *16 +}; +static int __init lowmem_init (void ) {register_shrinker (&lowmem_shrinker);
Signature · 1 line
1.5.4.3
PATCH 3/4 staging: android: lowmemorykiller: delete the decription file
Move the lowmemorykiller.txt into the actual source file which is really the correct place for it, and delete lowmemorykiller.txt.
Signed-off-by Daniel Walker <[email protected]>
--- drivers/staging/android/lowmemorykiller.c | 16 ++++++++++++++++ drivers/staging/android/lowmemorykiller.txt | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 drivers/staging/android/lowmemorykiller.txt
drivers/staging/android/lowmemorykiller.c +16 -0
@@ -1,5 +1,21 @@/* drivers/misc/lowmemorykiller.c * +* The lowmemorykiller driver lets user-space specify a set of memory thresholds +* where processes with a range of oom_adj values will get killed. Specify the +* minimum oom_adj values in /sys/module/lowmemorykiller/parameters/adj and the +* number of free pages in /sys/module/lowmemorykiller/parameters/minfree. Both +* files take a comma separated list of numbers in ascending order. +* +* For example, write "0,8" to /sys/module/lowmemorykiller/parameters/adj and +* "1024,4096" to /sys/module/lowmemorykiller/parameters/minfree to kill processes +* with a oom_adj value of 8 or higher when the free memory drops below 4096 pages +* and kill processes with a oom_adj value of 0 or higher when the free memory +* drops below 1024 pages. +* +* The driver considers memory used for caches to be free, but if a large +* percentage of the cached memory is locked this can be very inaccurate +* and processes may not get killed until the normal oom killer is triggered. +* * Copyright (C) 2007-2008 Google, Inc. * * This software is licensed under the terms of the GNU General Public
drivers/staging/android/lowmemorykiller.txt deleted +0 -16
@@ -1,16 +0,0 @@ -The lowmemorykiller driver lets user-space specify a set of memory thresholds -where processes with a range of oom_adj values will get killed. Specify the -minimum oom_adj values in /sys/module/lowmemorykiller/parameters/adj and the -number of free pages in /sys/module/lowmemorykiller/parameters/minfree. Both -files take a comma separated list of numbers in ascending order. - -For example, write "0,8" to /sys/module/lowmemorykiller/parameters/adj and -"1024,4096" to /sys/module/lowmemorykiller/parameters/minfree to kill processes -with a oom_adj value of 8 or higher when the free memory drops below 4096 pages -and kill processes with a oom_adj value of 0 or higher when the free memory -drops below 1024 pages. - -The driver considers memory used for caches to be free, but if a large -percentage of the cached memory is locked this can be very inaccurate -and processes may not get killed until the normal oom killer is triggered. -
Signature · 1 line
1.5.4.3
PATCH 4/4 staging: android: binder: partial checkpatch cleanup
Clean up 3 or so checkpatch errors from one of my prior patches.
Signed-off-by Daniel Walker <[email protected]>
--- drivers/staging/android/binder.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/android/binder.c +4 -4
@@ -785,8 +785,8 @@ static struct binder_buffer *binder_alloc_buf(struct binder_proc *proc,if (is_async) { proc->free_async_space -= size +sizeof (struct binder_buffer );binder_debug (BINDER_DEBUG_BUFFER_ALLOC_ASYNC , -"binder: %d: binder_alloc_buf size %zd " -"async free %zd\n" , proc->pid, size, +"binder: %d: binder_alloc_buf size %zd " +"async free %zd\n" , proc->pid, size, proc->free_async_space); }
@@ -1146,7 +1146,7 @@ static void binder_delete_ref(struct binder_ref *ref)binder_debug (BINDER_DEBUG_DEAD_BINDER ,"binder: %d delete ref %d desc %d " "has death notification\n" , ref->proc->pid, - ref->debug_id, ref->desc); + ref->debug_id, ref->desc);list_del (&ref->death->work.entry);kfree (ref->death);binder_stats_deleted (BINDER_STAT_DEATH );
@@ -2331,7 +2331,7 @@ retry:if (!weak && !strong) {binder_debug (BINDER_DEBUG_INTERNAL_REFS ,"binder: %d:%d node %d u%p c%p deleted\n" , - proc->pid, thread->pid, node->debug_id, + proc->pid, thread->pid, node->debug_id, node->ptr, node->cookie);rb_erase (&node->rb_node, &proc->nodes);kfree (node);
Signature · 1 line
1.5.4.3