Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753122AbbHUGOX (ORCPT ); Fri, 21 Aug 2015 02:14:23 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:37991 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751863AbbHUGOV (ORCPT ); Fri, 21 Aug 2015 02:14:21 -0400 From: Peng Sun To: gregkh@linuxfoundation.org, arve@android.com, riandrews@android.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Peng Sun Subject: [PATCH 1/6] fix android/ashmem.c several coding style Date: Fri, 21 Aug 2015 14:13:52 +0800 Message-Id: <1440137637-11351-2-git-send-email-sironhide0null@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440137637-11351-1-git-send-email-sironhide0null@gmail.com> References: <1440137637-11351-1-git-send-email-sironhide0null@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2194 Lines: 66 Signed-off-by: Peng Sun --- 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 -- 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/