From patchwork Sun Apr 6 00:13:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Shen Lim X-Patchwork-Id: 27880 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A6BF2066E for ; Sun, 6 Apr 2014 00:15:19 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wn1sf18460355obc.9 for ; Sat, 05 Apr 2014 17:15:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=n+rw87r1Zd9rqj42ttTp/7XaMtGXNHYod/KuMI4Yo2o=; b=GmWAJc5ERQ2Hp3WSdz29JcdFc4NFmHBp+DAqHgQFNWE+rX9m2A6+w3TtJ7h874Plrs yBNMrhwX34cERtMUU7JhcO9DhExEZ2ewi6vskXf5sAeybpyqxSHo7OmjbiwIzE6AWeVl JgQk28CATzl4iASc2cmkauddJoOe3DzTPAipBpRcWnj/KCPLYBZI7RIjgoSbcv5oOxYK ApeXj4wbUfDYpCZEyCfouSAlYmeIqVFGhqPkcKzKOSLomAIgAvr3iO9Prgvf7VCXese7 gbtLX3pNDTap1FmPw9AfT9xaWVe4QKB39z+hA4e6zaZuv5h/sbtGPyvuFolDojbQ+/3Z G48g== X-Gm-Message-State: ALoCoQk9zT4DptZ9LNCvxMTgS+0xdRLCb8gaevHTLvu7PRjxMnS3neYb3/Q9DVtt72e4OSwGJqSM X-Received: by 10.50.20.71 with SMTP id l7mr6009439ige.5.1396743318242; Sat, 05 Apr 2014 17:15:18 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.170 with SMTP id p39ls1358578qgd.49.gmail; Sat, 05 Apr 2014 17:15:18 -0700 (PDT) X-Received: by 10.52.69.146 with SMTP id e18mr3909407vdu.15.1396743318148; Sat, 05 Apr 2014 17:15:18 -0700 (PDT) Received: from mail-vc0-x235.google.com (mail-vc0-x235.google.com [2607:f8b0:400c:c03::235]) by mx.google.com with ESMTPS id rx9si2398096vcb.63.2014.04.05.17.15.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 05 Apr 2014 17:15:18 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c03::235 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c03::235; Received: by mail-vc0-f181.google.com with SMTP id id10so4180864vcb.40 for ; Sat, 05 Apr 2014 17:15:18 -0700 (PDT) X-Received: by 10.220.12.66 with SMTP id w2mr4500232vcw.15.1396743318019; Sat, 05 Apr 2014 17:15:18 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp52649vcv; Sat, 5 Apr 2014 17:15:17 -0700 (PDT) X-Received: by 10.66.155.193 with SMTP id vy1mr23130880pab.18.1396743317112; Sat, 05 Apr 2014 17:15:17 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tj6si6369732pbc.511.2014.04.05.17.15.15; Sat, 05 Apr 2014 17:15:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753874AbaDFAO2 (ORCPT + 27 others); Sat, 5 Apr 2014 20:14:28 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:52715 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753579AbaDFAOS (ORCPT ); Sat, 5 Apr 2014 20:14:18 -0400 Received: by mail-pa0-f52.google.com with SMTP id rd3so5125433pab.11 for ; Sat, 05 Apr 2014 17:14:17 -0700 (PDT) X-Received: by 10.66.102.66 with SMTP id fm2mr22938169pab.51.1396743257666; Sat, 05 Apr 2014 17:14:17 -0700 (PDT) Received: from localhost.localdomain (107-128-213-60.lightspeed.sntcca.sbcglobal.net. [107.128.213.60]) by mx.google.com with ESMTPSA id yx3sm26914217pbb.6.2014.04.05.17.14.16 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 05 Apr 2014 17:14:17 -0700 (PDT) From: Zi Shen Lim To: Greg Kroah-Hartman , devel@driverdev.osuosl.org Cc: Zi Shen Lim , linux-kernel@vger.kernel.org Subject: [PATCH] staging: ashmem: Fix coding style Date: Sat, 5 Apr 2014 17:13:56 -0700 Message-Id: <1396743236-5653-1-git-send-email-zlim.lnx@gmail.com> X-Mailer: git-send-email 1.8.3.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Original-Sender: zlim.lnx@gmail.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c03::235 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@gmail.com; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Keep checkpatch happy by addressing the following: CHECK: Alignment should match open parenthesis CHECK: Blank lines aren't necessary after an open brace '{' CHECK: No space is necessary after a cast Signed-off-by: Zi Shen Lim --- drivers/staging/android/ashmem.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c index 713a972..d441b65 100644 --- a/drivers/staging/android/ashmem.c +++ b/drivers/staging/android/ashmem.c @@ -447,8 +447,8 @@ ashmem_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) loff_t end = (range->pgend + 1) * PAGE_SIZE; do_fallocate(range->asma->file, - FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, - start, end - start); + FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, + start, end - start); range->purged = ASHMEM_WAS_PURGED; lru_del(range); @@ -549,7 +549,6 @@ static int get_name(struct ashmem_area *asma, void __user *name) mutex_lock(&ashmem_mutex); if (asma->name[ASHMEM_NAME_PREFIX_LEN] != '\0') { - /* * Copying only `len', instead of ASHMEM_NAME_LEN, bytes * prevents us from revealing one user's stack to another. @@ -751,10 +750,10 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) switch (cmd) { case ASHMEM_SET_NAME: - ret = set_name(asma, (void __user *) arg); + ret = set_name(asma, (void __user *)arg); break; case ASHMEM_GET_NAME: - ret = get_name(asma, (void __user *) arg); + ret = get_name(asma, (void __user *)arg); break; case ASHMEM_SET_SIZE: ret = -EINVAL; @@ -775,7 +774,7 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case ASHMEM_PIN: case ASHMEM_UNPIN: case ASHMEM_GET_PIN_STATUS: - ret = ashmem_pin_unpin(asma, cmd, (void __user *) arg); + ret = ashmem_pin_unpin(asma, cmd, (void __user *)arg); break; case ASHMEM_PURGE_ALL_CACHES: ret = -EPERM; @@ -799,7 +798,6 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static long compat_ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - switch (cmd) { case COMPAT_ASHMEM_SET_SIZE: cmd = ASHMEM_SET_SIZE;