Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1212736 > unrolled thread

[PATCH 5/6] fix android/sync.h several coding style issues

Started byPeng Sun <sironhide0null@gmail.com>
First post2015-08-25 09:00 +0200
Last post2015-08-25 09:00 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 5/6] fix android/sync.h several coding style issues Peng Sun <sironhide0null@gmail.com> - 2015-08-25 09:00 +0200
    [PATCH 6/6] fix android/timed_gpio.c several coding style issues Peng Sun <sironhide0null@gmail.com> - 2015-08-25 09:00 +0200

#1212736 — [PATCH 5/6] fix android/sync.h several coding style issues

FromPeng Sun <sironhide0null@gmail.com>
Date2015-08-25 09:00 +0200
Subject[PATCH 5/6] fix android/sync.h several coding style issues
Message-ID<q1gn8-7jI-5@gated-at.bofh.it>
Corrections based on checkpatch.pl with --strict
1) spinlock_t definition without comment
2) Alignment should match open parenthesis

Signed-off-by: Peng Sun <sironhide0null@gmail.com>
---
 drivers/staging/android/sync.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
index 61f8a3a..87358d2 100644
--- a/drivers/staging/android/sync.h
+++ b/drivers/staging/android/sync.h
@@ -94,12 +94,11 @@ struct sync_timeline {
 	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;
-	spinlock_t		child_list_lock;
+	spinlock_t		child_list_lock; /* protect destroyed */
 
 	struct list_head	active_list_head;
 
@@ -351,6 +350,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 */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1212743 — [PATCH 6/6] fix android/timed_gpio.c several coding style issues

FromPeng Sun <sironhide0null@gmail.com>
Date2015-08-25 09:00 +0200
Subject[PATCH 6/6] fix android/timed_gpio.c several coding style issues
Message-ID<q1gn9-7jI-27@gated-at.bofh.it>
In reply to#1212736
Corrections based on checkpatch.pl with --strict
1) Please don't use multiple blank lines
2) spinlock_t definition without comment
3) Alignment should match open parenthesis

Signed-off-by: Peng Sun <sironhide0null@gmail.com>
---
 drivers/staging/android/timed_gpio.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c
index ce11726..33acbbe 100644
--- a/drivers/staging/android/timed_gpio.c
+++ b/drivers/staging/android/timed_gpio.c
@@ -25,11 +25,10 @@
 #include "timed_output.h"
 #include "timed_gpio.h"
 
-
 struct timed_gpio_data {
 	struct timed_output_dev dev;
 	struct hrtimer timer;
-	spinlock_t lock;
+	spinlock_t lock; /* protect structure fields */
 	unsigned gpio;
 	int max_timeout;
 	u8 active_low;
@@ -76,8 +75,9 @@ static void gpio_enable(struct timed_output_dev *dev, int value)
 			value = data->max_timeout;
 
 		hrtimer_start(&data->timer,
-			ktime_set(value / 1000, (value % 1000) * 1000000),
-			HRTIMER_MODE_REL);
+			      ktime_set(value / 1000, (value % 1000) *
+					1000000),
+			      HRTIMER_MODE_REL);
 	}
 
 	spin_unlock_irqrestore(&data->lock, flags);
@@ -94,8 +94,9 @@ static int timed_gpio_probe(struct platform_device *pdev)
 		return -EBUSY;
 
 	gpio_data = devm_kzalloc(&pdev->dev,
-			sizeof(struct timed_gpio_data) * pdata->num_gpios,
-			GFP_KERNEL);
+				 sizeof(struct timed_gpio_data) *
+				 pdata->num_gpios,
+				 GFP_KERNEL);
 	if (!gpio_data)
 		return -ENOMEM;
 
@@ -104,7 +105,7 @@ static int timed_gpio_probe(struct platform_device *pdev)
 		gpio_dat = &gpio_data[i];
 
 		hrtimer_init(&gpio_dat->timer, CLOCK_MONOTONIC,
-				HRTIMER_MODE_REL);
+			     HRTIMER_MODE_REL);
 		gpio_dat->timer.function = gpio_timer_func;
 		spin_lock_init(&gpio_dat->lock);
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web