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


Groups > linux.kernel > #1213517 > unrolled thread

[PATCH 4/8] fix staging:android style issue:Prefer kernel type 'u32' over 'uint32_t'

Started byPeng Sun <sironhide0null@gmail.com>
First post2015-08-26 06:00 +0200
Last post2015-08-26 06:00 +0200
Articles 5 — 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 4/8] fix staging:android style issue:Prefer kernel type 'u32' over 'uint32_t' Peng Sun <sironhide0null@gmail.com> - 2015-08-26 06:00 +0200
    [PATCH 8/8] fix staging:android style issue:Please don't use multiple blank lines Peng Sun <sironhide0null@gmail.com> - 2015-08-26 06:00 +0200
    [PATCH 6/8] fix staging:android style issue:Comparison to NULL could be written Peng Sun <sironhide0null@gmail.com> - 2015-08-26 06:00 +0200
      [PATCH 7/8] fix staging:android style issue:definition without comment Peng Sun <sironhide0null@gmail.com> - 2015-08-26 06:00 +0200
    [PATCH 5/8] fix staging:android style issue:Please use a blank line after function/struct/union/enum declarations Peng Sun <sironhide0null@gmail.com> - 2015-08-26 06:00 +0200

#1213517 — [PATCH 4/8] fix staging:android style issue:Prefer kernel type 'u32' over 'uint32_t'

FromPeng Sun <sironhide0null@gmail.com>
Date2015-08-26 06:00 +0200
Subject[PATCH 4/8] fix staging:android style issue:Prefer kernel type 'u32' over 'uint32_t'
Message-ID<q1A2t-2sv-3@gated-at.bofh.it>
Signed-off-by: Peng Sun <sironhide0null@gmail.com>
---
 drivers/staging/android/lowmemorykiller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 61937ab..78e1281 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -42,7 +42,7 @@
 #include <linux/profile.h>
 #include <linux/notifier.h>
 
-static uint32_t lowmem_debug_level = 1;
+static u32 lowmem_debug_level = 1;
 static short lowmem_adj[6] = {
 	0,
 	1,
-- 
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]


#1213518 — [PATCH 8/8] fix staging:android style issue:Please don't use multiple blank lines

FromPeng Sun <sironhide0null@gmail.com>
Date2015-08-26 06:00 +0200
Subject[PATCH 8/8] fix staging:android style issue:Please don't use multiple blank lines
Message-ID<q1A2t-2sv-13@gated-at.bofh.it>
In reply to#1213517
Signed-off-by: Peng Sun <sironhide0null@gmail.com>
---
 drivers/staging/android/timed_gpio.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c
index 5c55463..33acbbe 100644
--- a/drivers/staging/android/timed_gpio.c
+++ b/drivers/staging/android/timed_gpio.c
@@ -25,7 +25,6 @@
 #include "timed_output.h"
 #include "timed_gpio.h"
 
-
 struct timed_gpio_data {
 	struct timed_output_dev dev;
 	struct hrtimer timer;
-- 
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] | [next] | [standalone]


#1213519 — [PATCH 6/8] fix staging:android style issue:Comparison to NULL could be written

FromPeng Sun <sironhide0null@gmail.com>
Date2015-08-26 06:00 +0200
Subject[PATCH 6/8] fix staging:android style issue:Comparison to NULL could be written
Message-ID<q1A2t-2sv-17@gated-at.bofh.it>
In reply to#1213517
Signed-off-by: Peng Sun <sironhide0null@gmail.com>
---
 drivers/staging/android/sw_sync.c |  6 +++---
 drivers/staging/android/sync.c    | 18 +++++++++---------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c
index c90838d..29b5c35 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -145,7 +145,7 @@ static int sw_sync_open(struct inode *inode, struct file *file)
 	get_task_comm(task_comm, current);
 
 	obj = sw_sync_timeline_create(task_comm);
-	if (obj == NULL)
+	if (!obj)
 		return -ENOMEM;
 
 	file->private_data = obj;
@@ -179,14 +179,14 @@ static long sw_sync_ioctl_create_fence(struct sw_sync_timeline *obj,
 	}
 
 	pt = sw_sync_pt_create(obj, data.value);
-	if (pt == NULL) {
+	if (!pt) {
 		err = -ENOMEM;
 		goto err;
 	}
 
 	data.name[sizeof(data.name) - 1] = '\0';
 	fence = sync_fence_create(data.name, pt);
-	if (fence == NULL) {
+	if (!fence) {
 		sync_pt_free(pt);
 		err = -ENOMEM;
 		goto err;
diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 9a67d23..e0c1acb 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -43,7 +43,7 @@ struct sync_timeline *sync_timeline_create(const struct sync_timeline_ops *ops,
 		return NULL;
 
 	obj = kzalloc(size, GFP_KERNEL);
-	if (obj == NULL)
+	if (!obj)
 		return NULL;
 
 	kref_init(&obj->kref);
@@ -130,7 +130,7 @@ struct sync_pt *sync_pt_create(struct sync_timeline *obj, int size)
 		return NULL;
 
 	pt = kzalloc(size, GFP_KERNEL);
-	if (pt == NULL)
+	if (!pt)
 		return NULL;
 
 	spin_lock_irqsave(&obj->child_list_lock, flags);
@@ -155,7 +155,7 @@ static struct sync_fence *sync_fence_alloc(int size, const char *name)
 	struct sync_fence *fence;
 
 	fence = kzalloc(size, GFP_KERNEL);
-	if (fence == NULL)
+	if (!fence)
 		return NULL;
 
 	fence->file = anon_inode_getfile("sync_fence", &sync_fence_fops,
@@ -193,7 +193,7 @@ struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt)
 	struct sync_fence *fence;
 
 	fence = sync_fence_alloc(offsetof(struct sync_fence, cbs[1]), name);
-	if (fence == NULL)
+	if (!fence)
 		return NULL;
 
 	fence->num_fences = 1;
@@ -215,7 +215,7 @@ struct sync_fence *sync_fence_fdget(int fd)
 {
 	struct file *file = fget(fd);
 
-	if (file == NULL)
+	if (!file)
 		return NULL;
 
 	if (file->f_op != &sync_fence_fops)
@@ -262,7 +262,7 @@ struct sync_fence *sync_fence_merge(const char *name,
 	unsigned long size = offsetof(struct sync_fence, cbs[num_fences]);
 
 	fence = sync_fence_alloc(size, name);
-	if (fence == NULL)
+	if (!fence)
 		return NULL;
 
 	atomic_set(&fence->status, num_fences);
@@ -583,14 +583,14 @@ static long sync_fence_ioctl_merge(struct sync_fence *fence, unsigned long arg)
 	}
 
 	fence2 = sync_fence_fdget(data.fd2);
-	if (fence2 == NULL) {
+	if (!fence2) {
 		err = -ENOENT;
 		goto err_put_fd;
 	}
 
 	data.name[sizeof(data.name) - 1] = '\0';
 	fence3 = sync_fence_merge(data.name, fence, fence2);
-	if (fence3 == NULL) {
+	if (!fence3) {
 		err = -ENOMEM;
 		goto err_put_fence2;
 	}
@@ -666,7 +666,7 @@ static long sync_fence_ioctl_fence_info(struct sync_fence *fence,
 		size = 4096;
 
 	data = kzalloc(size, GFP_KERNEL);
-	if (data == NULL)
+	if (!data)
 		return -ENOMEM;
 
 	strlcpy(data->name, fence->name, sizeof(data->name));
-- 
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] | [next] | [standalone]


#1213523 — [PATCH 7/8] fix staging:android style issue:definition without comment

FromPeng Sun <sironhide0null@gmail.com>
Date2015-08-26 06:00 +0200
Subject[PATCH 7/8] fix staging:android style issue:definition without comment
Message-ID<q1A2t-2sv-19@gated-at.bofh.it>
In reply to#1213519
Signed-off-by: Peng Sun <sironhide0null@gmail.com>
---
 drivers/staging/android/sync.h       | 2 +-
 drivers/staging/android/timed_gpio.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
index 18a94ed..bb42923 100644
--- a/drivers/staging/android/sync.h
+++ b/drivers/staging/android/sync.h
@@ -94,11 +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;
+	/* protect field destroyed */
 	spinlock_t		child_list_lock;
 
 	struct list_head	active_list_head;
diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c
index 5407257..5c55463 100644
--- a/drivers/staging/android/timed_gpio.c
+++ b/drivers/staging/android/timed_gpio.c
@@ -29,7 +29,7 @@
 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;
-- 
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] | [next] | [standalone]


#1213525 — [PATCH 5/8] fix staging:android style issue:Please use a blank line after function/struct/union/enum declarations

FromPeng Sun <sironhide0null@gmail.com>
Date2015-08-26 06:00 +0200
Subject[PATCH 5/8] fix staging:android style issue:Please use a blank line after function/struct/union/enum declarations
Message-ID<q1A2t-2sv-15@gated-at.bofh.it>
In reply to#1213517
Signed-off-by: Peng Sun <sironhide0null@gmail.com>
---
 drivers/staging/android/lowmemorykiller.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 78e1281..3f1311f 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -49,6 +49,7 @@ static short lowmem_adj[6] = {
 	6,
 	12,
 };
+
 static int lowmem_adj_size = 4;
 static int lowmem_minfree[6] = {
 	3 * 512,	/* 6MB */
@@ -56,8 +57,8 @@ static int lowmem_minfree[6] = {
 	4 * 1024,	/* 16MB */
 	16 * 1024,	/* 64MB */
 };
-static int lowmem_minfree_size = 4;
 
+static int lowmem_minfree_size = 4;
 static unsigned long lowmem_deathpending_timeout;
 
 #define lowmem_print(level, x...)			\
-- 
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