Staging: anrdroid: sync.c: fixed all checkpatch warnings
PATCH 1/1 Staging: anrdroid: sync.c: fixed all checkpatch warnings
Specifically fixed:
sync.c:128: WARNING: braces {} are not necessary for single statement blocks sync.c:879: WARNING: Prefer seq_puts to seq_printf
sync.c:883: WARNING: Prefer seq_puts to seq_printf
sync.c:898: WARNING: Prefer seq_puts to seq_printf
sync.c:902: WARNING: Prefer seq_puts to seq_printf
sync.c:943: WARNING: Prefer seq_puts to seq_printf
sync.c:952: WARNING: Prefer seq_puts to seq_printf
sync.c:956: WARNING: Prefer seq_puts to seq_printf
sync.c:964: WARNING: Prefer seq_puts to seq_printf
total: 9 warnings,
--- drivers/staging/android/sync.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-)
drivers/staging/android/sync.c +10 -11
@@ -125,9 +125,8 @@ static void sync_timeline_remove_pt(struct sync_pt *pt)spin_unlock_irqrestore (&obj->active_list_lock, flags);spin_lock_irqsave (&obj->child_list_lock, flags); -if (!list_empty (&pt->child_list)) { +if (!list_empty (&pt->child_list))list_del_init (&pt->child_list); - }spin_unlock_irqrestore (&obj->child_list_lock, flags); }
@@ -876,11 +875,11 @@ static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence)seq_printf (s," / %s" , value); } }else if (pt->parent->ops->print_pt) { -seq_printf (s,": " ); +seq_puts (s,": " ); pt->parent->ops->print_pt (s, pt); } -seq_printf (s,"\n" ); +seq_puts (s,"\n" ); }static void sync_print_obj (struct seq_file *s,struct sync_timeline *obj)
@@ -893,13 +892,13 @@ static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj)if (obj->ops->timeline_value_str) {char value[64 ]; obj->ops->timeline_value_str (obj, value,sizeof (value)); -seq_printf (s,": %s" , value); +seq_puts (s,": %s" , value); }else if (obj->ops->print_obj) { -seq_printf (s,": " ); +seq_puts (s,": " ); obj->ops->print_obj (s, obj); } -seq_printf (s,"\n" ); +seq_puts (s,"\n" );spin_lock_irqsave (&obj->child_list_lock, flags);list_for_each (pos, &obj->child_list_head) {
@@ -940,7 +939,7 @@ static int sync_debugfs_show(struct seq_file *s, void *unused)unsigned long flags;struct list_head *pos; -seq_printf (s,"objs:\n--------------\n" ); +seq_puts (s,"objs:\n--------------\n" );spin_lock_irqsave (&sync_timeline_list_lock, flags);list_for_each (pos, &sync_timeline_list_head) {
@@ -949,11 +948,11 @@ static int sync_debugfs_show(struct seq_file *s, void *unused) sync_timeline_list);sync_print_obj (s, obj); -seq_printf (s,"\n" ); +seq_puts (s,"\n" ); }spin_unlock_irqrestore (&sync_timeline_list_lock, flags); -seq_printf (s,"fences:\n--------------\n" ); +seq_puts (s,"fences:\n--------------\n" );spin_lock_irqsave (&sync_fence_list_lock, flags);list_for_each (pos, &sync_fence_list_head) {
@@ -961,7 +960,7 @@ static int sync_debugfs_show(struct seq_file *s, void *unused) container_of(pos, struct sync_fence, sync_fence_list);sync_print_fence (s, fence); -seq_printf (s,"\n" ); +seq_puts (s,"\n" ); }spin_unlock_irqrestore (&sync_fence_list_lock, flags);return 0 ;
Signature · 1 line
1.7.10.4
Quoted 12 lines · Aldo Iljazi
Specifically fixed:
sync.c:128: WARNING: braces {} are not necessary for single statement blocks sync.c:879: WARNING: Preferseq_putstoseq_printf
sync.c:883: WARNING: Preferseq_putstoseq_printf
sync.c:898: WARNING: Preferseq_putstoseq_printf
sync.c:902: WARNING: Preferseq_putstoseq_printf
sync.c:943: WARNING: Preferseq_putstoseq_printf
sync.c:952: WARNING: Preferseq_putstoseq_printf
sync.c:956: WARNING: Preferseq_putstoseq_printf
sync.c:964: WARNING: Preferseq_putstoseq_printf
total: 9 warnings,
This breaks the build and it doesn't apply to linux-next. Please be more careful in the future.
regards,
dan carpenter