staging: android: Fixed coding style issues reported by checkpatch
PATCH 1/1 staging: android: Fixed coding style issues reported by checkpatch
List of modified files with comment,lowmemorykiller.c: Added blank line after array declaration sync.h: Added comment for spinlock_t definition,
Fixed parentheses alignment in function declarationsync_debug.c: Removed unnecessary braces for single statement block timed_gpio.c: Added comment for spinlock_t definition
--- drivers/staging/android/lowmemorykiller.c | 2 ++ drivers/staging/android/sync.h | 10 ++-------- drivers/staging/android/sync_debug.c | 3 +-- drivers/staging/android/timed_gpio.c | 1 + 4 files changed, 6 insertions(+), 10 deletions(-)
drivers/staging/android/lowmemorykiller.c +2 -0
@@ -50,6 +50,7 @@ static short lowmem_adj[6] = {6 , 12, }; +static int lowmem_adj_size =4 ;static int lowmem_minfree[6 ] = { 3 * 512, /* 6MB */
@@ -57,6 +58,7 @@ static int lowmem_minfree[6] = {4 *1024 ,/* 16MB */ 16 * 1024, /* 64MB */ }; +static int lowmem_minfree_size =4 ;static unsigned long lowmem_deathpending_timeout;
drivers/staging/android/sync.h +2 -8
@@ -93,16 +93,13 @@ struct sync_timeline {struct kref kref;const struct sync_timeline_ops *ops;char name[32 ]; -/* protected by child_list_lock */ bool destroyed;int context, value; -struct list_head child_list_head; +/* lock to protect child_list_head */ spinlock_t child_list_lock; -struct list_head active_list_head; -#ifdef CONFIG_DEBUG_FS struct list_head sync_timeline_list;#endif
@@ -122,7 +119,6 @@ struct sync_timeline {*/ struct sync_pt {struct fence base; -struct list_head child_list;struct list_head active_list; };
@@ -159,10 +155,8 @@ struct sync_fence {struct list_head sync_fence_list;#endif int num_fences; -wait_queue_head_t wq;atomic_t status; -struct sync_fence_cb cbs[]; };
@@ -361,6 +355,6 @@ void sync_dump(void);# define sync_dump ()#endif int sync_fence_wake_up_wq (wait_queue_t *curr,unsigned mode, -int wake_flags,void *key); +int wake_flags,void *key);#endif /* _LINUX_SYNC_H */
drivers/staging/android/sync_debug.c +1 -2
@@ -158,9 +158,8 @@ static void sync_print_fence(struct seq_file *s, struct sync_fence *fence)seq_printf (s,"[%p] %s: %s\n" , fence, fence->name,sync_status_str (atomic_read (&fence->status))); -for (i =0 ; i < fence->num_fences; ++i) { +for (i =0 ; i < fence->num_fences; ++i)sync_print_pt (s, fence->cbs[i].sync_pt, true); - }spin_lock_irqsave (&fence->wq.lock, flags);list_for_each_entry (pos, &fence->wq.task_list, task_list) {
drivers/staging/android/timed_gpio.c +1 -0
@@ -28,6 +28,7 @@struct timed_gpio_data {struct timed_output_dev dev;struct hrtimer timer; +/* lock protects gpio access while setting it's value */ spinlock_t lock;unsigned gpio;int max_timeout;
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 6 lines · Saiyam Doshi
List of modified files with comment,
lowmemorykiller.c: Added blank line after array declarationsync.h: Added comment forspinlock_tdefinition,
Fixed parentheses alignment in function declarationsync_debug.c: Removed unnecessary braces for single statement blocktimed_gpio.c: Added comment forspinlock_tdefinition
You need to do only one thing per patch, please split this up into multiple patches.
Also verify that these are all really needed, please always work against linux-next, not Linus's kernel tree.
thanks,
greg k-h
Quoted 2 lines · Greg KH
You need to do only one thing per patch, please split this up into multiple patches.
Created two separate patches out of it having same logical change in each.
Quoted 2 lines
Also verify that these are all really needed, please always work against linux-next, not Linus's kernel tree.
In 'drivers/staging/android/TODO' checkpatch.pl cleanup mentioned. Also this patches are created from latest linux-next tree. How you get information about target kernel version for submitted patch? I mean in patch there is no information about kernel version from which the patch is created.
Quoted 1 line
From
fd6a8ba1030fdcfc1efca9b377cd0957580708ddMon Sep 17 00:00:00 2001
From: Saiyam Doshi <[email protected]>
Date: Wed, 9 Mar 2016 00:15:04 +0530
Subject: [PATCH 1/2] staging: android: Fixed coding style issue reported by
checkpatch
Alignment should match open parenthesis
--- drivers/staging/android/sync.c | 6 +++--- drivers/staging/android/sync.h | 2 +- drivers/staging/android/sync_debug.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/android/sync.c +3 -3
@@ -430,7 +430,7 @@ static unsigned int sync_file_poll(struct file *file, poll_table *wait) }static long sync_file_ioctl_merge (struct sync_file *sync_file, -unsigned long arg) +unsigned long arg) {int fd =get_unused_fd_flags (O_CLOEXEC );int err;
@@ -500,7 +500,7 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size) }static long sync_file_ioctl_fence_info (struct sync_file *sync_file, -unsigned long arg) +unsigned long arg) {struct sync_file_info *info;__u32 size;
@@ -552,7 +552,7 @@ out: }static long sync_file_ioctl (struct file *file,unsigned int cmd, -unsigned long arg) +unsigned long arg) {struct sync_file *sync_file = file->private_data;
drivers/staging/android/sync.h +1 -1
@@ -192,7 +192,7 @@ struct sync_file *sync_file_create(const char *name, struct fence *fence);* new merged sync_file or NULL in case of error. */ struct sync_file *sync_file_merge (const char *name, -struct sync_file *a,struct sync_file *b); +struct sync_file *a,struct sync_file *b);/** * sync_file_fdget() - get a sync_file from an fd
drivers/staging/android/sync_debug.c +2 -2
@@ -105,7 +105,7 @@ static void sync_print_fence(struct seq_file *s, struct fence *fence, bool show) }if ((!fence || fence->ops->timeline_value_str) && - fence->ops->fence_value_str) { + fence->ops->fence_value_str) {char value[64 ];bool success;
@@ -153,7 +153,7 @@ static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj) }static void sync_print_sync_file (struct seq_file *s, -struct sync_file *sync_file) +struct sync_file *sync_file) {int i;
Signature · 1 line
1.9.1
Quoted 1 line
From
23573696f7dcc38d3182ed8da53525284ee83f6fMon Sep 17 00:00:00 2001
From: Saiyam Doshi <[email protected]>
Date: Wed, 9 Mar 2016 00:28:45 +0530
Subject: [PATCH 2/2] staging: android: Fixed coding style issue reported by
checkpatch
spinlock_t definition without comment
--- drivers/staging/android/timed_gpio.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/android/timed_gpio.c +1 -0
@@ -28,6 +28,7 @@struct timed_gpio_data {struct timed_output_dev dev;struct hrtimer timer; +/* lock protects gpio access while setting it's value */ spinlock_t lock;unsigned gpio;int max_timeout;
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 5 lines · Saiyam Doshi
Quoted 2 lines · Greg KH
You need to do only one thing per patch, please split this up into multiple patches.
Created two separate patches out of it having same logical change in each.
You have to send these as two different emails, I can't do anything with patches as attachments, sorry.
thanks,
greg k-h