mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] staging: android: ashmem.c: fix several coding style issues
@ 2015-08-27  7:41 Peng Sun
  2015-08-27  7:41 ` [PATCH 1/3] staging: android: ashmem.c: 'spaces preferred around that -' style issue Peng Sun
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peng Sun @ 2015-08-27  7:41 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Peng Sun

patches based on linux-next next-20150826
Corrections based on checkpatch.pl with --strict

Peng Sun (3):
  staging: android: ashmem.c: 'spaces preferred around that -' style
    issue
  staging: android: ashmem.c: 'No space necessary after' style issue
  staging: android: ashmem.c: 'Alignment' style issue

 drivers/staging/android/ashmem.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

--
1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] staging: android: ashmem.c: 'spaces preferred around that -' style issue
  2015-08-27  7:41 [PATCH 0/3] staging: android: ashmem.c: fix several coding style issues Peng Sun
@ 2015-08-27  7:41 ` Peng Sun
  2015-08-27  7:41 ` [PATCH 2/3] staging: android: ashmem.c: 'No space necessary after' " Peng Sun
  2015-08-27  7:41 ` [PATCH 3/3] staging: android: ashmem.c: 'Alignment' " Peng Sun
  2 siblings, 0 replies; 4+ messages in thread
From: Peng Sun @ 2015-08-27  7:41 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Peng Sun

fix a CHECK style issue by checkpatch.pl with --strict:
	spaces preferred around that '-'

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

diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index 60200a3..b340ddc 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -618,7 +618,8 @@ static int ashmem_pin(struct ashmem_area *asma, size_t pgstart, size_t pgend)
 
 			/* Case #3: We overlap from the rear, so adjust it */
 			if (range->pgend <= pgend) {
-				range_shrink(range, range->pgstart, pgstart-1);
+				range_shrink(range, range->pgstart,
+					     pgstart - 1);
 				continue;
 			}
 
-- 
1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/3] staging: android: ashmem.c: 'No space necessary after' style issue
  2015-08-27  7:41 [PATCH 0/3] staging: android: ashmem.c: fix several coding style issues Peng Sun
  2015-08-27  7:41 ` [PATCH 1/3] staging: android: ashmem.c: 'spaces preferred around that -' style issue Peng Sun
@ 2015-08-27  7:41 ` Peng Sun
  2015-08-27  7:41 ` [PATCH 3/3] staging: android: ashmem.c: 'Alignment' " Peng Sun
  2 siblings, 0 replies; 4+ messages in thread
From: Peng Sun @ 2015-08-27  7:41 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Peng Sun

fix two CHECK issues by checkpatch.pl with --strict:
	No space is necessary after a cast

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

diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index b340ddc..1312600 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -716,7 +716,7 @@ static int ashmem_pin_unpin(struct ashmem_area *asma, unsigned long cmd,
 	if (unlikely((pin.offset | pin.len) & ~PAGE_MASK))
 		return -EINVAL;
 
-	if (unlikely(((__u32) -1) - pin.offset < pin.len))
+	if (unlikely(((__u32)-1) - pin.offset < pin.len))
 		return -EINVAL;
 
 	if (unlikely(PAGE_ALIGN(asma->size) < pin.offset + pin.len))
@@ -760,7 +760,7 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		ret = -EINVAL;
 		if (!asma->file) {
 			ret = 0;
-			asma->size = (size_t) arg;
+			asma->size = (size_t)arg;
 		}
 		break;
 	case ASHMEM_GET_SIZE:
-- 
1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3/3] staging: android: ashmem.c: 'Alignment' style issue
  2015-08-27  7:41 [PATCH 0/3] staging: android: ashmem.c: fix several coding style issues Peng Sun
  2015-08-27  7:41 ` [PATCH 1/3] staging: android: ashmem.c: 'spaces preferred around that -' style issue Peng Sun
  2015-08-27  7:41 ` [PATCH 2/3] staging: android: ashmem.c: 'No space necessary after' " Peng Sun
@ 2015-08-27  7:41 ` Peng Sun
  2 siblings, 0 replies; 4+ messages in thread
From: Peng Sun @ 2015-08-27  7:41 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Peng Sun

fix two CHECK issues by checkpatch.pl with --strict:
	Alignment should match open parenthesis

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

diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index 1312600..d786ec1 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -834,16 +834,16 @@ static int __init ashmem_init(void)
 	int ret;
 
 	ashmem_area_cachep = kmem_cache_create("ashmem_area_cache",
-					  sizeof(struct ashmem_area),
-					  0, 0, NULL);
+					       sizeof(struct ashmem_area),
+					       0, 0, NULL);
 	if (unlikely(!ashmem_area_cachep)) {
 		pr_err("failed to create slab cache\n");
 		return -ENOMEM;
 	}
 
 	ashmem_range_cachep = kmem_cache_create("ashmem_range_cache",
-					  sizeof(struct ashmem_range),
-					  0, 0, NULL);
+						sizeof(struct ashmem_range),
+						0, 0, NULL);
 	if (unlikely(!ashmem_range_cachep)) {
 		pr_err("failed to create slab cache\n");
 		return -ENOMEM;
-- 
1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-27  7:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-27  7:41 [PATCH 0/3] staging: android: ashmem.c: fix several coding style issues Peng Sun
2015-08-27  7:41 ` [PATCH 1/3] staging: android: ashmem.c: 'spaces preferred around that -' style issue Peng Sun
2015-08-27  7:41 ` [PATCH 2/3] staging: android: ashmem.c: 'No space necessary after' " Peng Sun
2015-08-27  7:41 ` [PATCH 3/3] staging: android: ashmem.c: 'Alignment' " Peng Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome