From: Peng Sun <sironhide0null@gmail.com>
To: gregkh@linuxfoundation.org, arve@android.com, riandrews@android.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Peng Sun <sironhide0null@gmail.com>
Subject: [PATCH 1/6] fix android/ashmem.c several coding style
Date: Fri, 21 Aug 2015 14:13:52 +0800 [thread overview]
Message-ID: <1440137637-11351-2-git-send-email-sironhide0null@gmail.com> (raw)
In-Reply-To: <1440137637-11351-1-git-send-email-sironhide0null@gmail.com>
Signed-off-by: Peng Sun <sironhide0null@gmail.com>
---
drivers/staging/android/ashmem.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index 60200a3..d786ec1 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;
}
@@ -715,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))
@@ -759,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:
@@ -833,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
next prev parent reply other threads:[~2015-08-21 6:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 6:13 [PATCH 0/6] fix drivers/staging/android some coding style issues Peng Sun
2015-08-21 6:13 ` Peng Sun [this message]
2015-08-21 6:13 ` [PATCH 2/6] fix android/lowmemorykiller.c several coding style Peng Sun
2015-08-21 6:13 ` [PATCH 3/6] fix android/sync.c some coding style issues Peng Sun
2015-08-21 6:13 ` [PATCH 4/6] fix android/sync.h some coding style CHECK issues Peng Sun
2015-08-21 6:13 ` [PATCH 5/6] fix android/timed_gpio.c " Peng Sun
2015-08-21 6:13 ` [PATCH 6/6] fix android/sw_sync.c " Peng Sun
2015-08-24 13:29 ` [PATCH 0/6] fix drivers/staging/android some coding style issues Sudip Mukherjee
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=1440137637-11351-2-git-send-email-sironhide0null@gmail.com \
--to=sironhide0null@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