mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Saiyam Doshi <saiyamdoshi.in@gmail.com>
To: gregkh@linuxfoundation.org, arve@android.com, riandrews@android.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/1] staging: android: Fixed coding style issues reported by checkpatch
Date: Mon,  7 Mar 2016 01:00:33 +0530	[thread overview]
Message-ID: <1457292633-3058-1-git-send-email-saiyamdoshi.in@gmail.com> (raw)

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 declaration
sync_debug.c: Removed unnecessary braces for single statement block
timed_gpio.c: Added comment for spinlock_t definition

Signed-off-by: Saiyam Doshi <saiyamdoshi.in@gmail.com>
---
 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(-)

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 8b5a4a8..256b257 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -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;
diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
index afa0752..c55204b 100644
--- a/drivers/staging/android/sync.h
+++ b/drivers/staging/android/sync.h
@@ -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 */
diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c
index f45d13c..02a1649 100644
--- a/drivers/staging/android/sync_debug.c
+++ b/drivers/staging/android/sync_debug.c
@@ -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) {
diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c
index bcd9924..cede99a 100644
--- a/drivers/staging/android/timed_gpio.c
+++ b/drivers/staging/android/timed_gpio.c
@@ -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;
-- 
1.9.1

             reply	other threads:[~2016-03-06 19:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-06 19:30 Saiyam Doshi [this message]
2016-03-07  1:21 ` Greg KH
2016-03-08 20:25   ` Saiyam Doshi
2016-03-11 21:57     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457292633-3058-1-git-send-email-saiyamdoshi.in@gmail.com \
    --to=saiyamdoshi.in@gmail.com \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riandrews@android.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®