From patchwork Sun Aug 21 07:24:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9292053 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 956AD607F0 for ; Sun, 21 Aug 2016 07:24:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 862A328BB0 for ; Sun, 21 Aug 2016 07:24:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AF8028BB2; Sun, 21 Aug 2016 07:24:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F66D28BB0 for ; Sun, 21 Aug 2016 07:24:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752517AbcHUHYU (ORCPT ); Sun, 21 Aug 2016 03:24:20 -0400 Received: from mout.web.de ([212.227.17.12]:49328 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751789AbcHUHYS (ORCPT ); Sun, 21 Aug 2016 03:24:18 -0400 Received: from [192.168.1.3] ([77.181.85.179]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0M4ZPc-1bEKVs2Nlk-00yhmG; Sun, 21 Aug 2016 09:24:04 +0200 Subject: [PATCH 4/7] aacraid: Delete unnecessary braces To: linux-scsi@vger.kernel.org, aacraid@microsemi.com, "James E. J. Bottomley" , "Martin K. Petersen" References: <566ABCD9.1060404@users.sourceforge.net> <40d8607f-3934-c31f-3791-ef6a67d65d45@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: Date: Sun, 21 Aug 2016 09:24:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <40d8607f-3934-c31f-3791-ef6a67d65d45@users.sourceforge.net> X-Provags-ID: V03:K0:X+V5r+yJ1KGbZT5WoP4+eQ4wFr9v9FfUK3mbNQ+JqPveLcl3ASG 2kqpW7AJfb8YScSlnMW7I6d05QDd99iZFGNi2d5ICb9KiRm9MIITLS/jqenPFLfAbznPpW9 3HONq/7Xl88OFcnd9+jzcq6IMdFKoCpOwB8o8VoyNOYV6GT6y4EJEFUa7BysdsPmgnIvLXi yNbe/FSibUMbi5tNRbbiQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:INcLaBlu9rc=:ezlWjEawiO55iMZv21Z2+X Q0mN8Az8TzvjLB5nzo9ruCjPDeSEdigRpnkaFsyKY/FC40RPUSf1a2MM9+J75ow2UcH2SQ0tn /vysKnnCrUKaTgh6r1+l+j71DtXumtw5NAAUQJYOOFMlvbf/XTRz8HJYDxIKDjpFYw7ABvvfI w7U6sf0GyeIiDOBNmcwJdcyk8kP5+YzcYm6OnqDP5vN5zx+AnbaGu/oDGQGc9mneaE1KE9zgR htotC0zj8KIJNDAGvb7EPnI78SqV09XXQ6tHHyICtiR5uvoYJ/zrBZ1SlorWmJgSDymeMr/2E T1OEQMifKLW4JfJJsUGFrgwPXwabDu4xk7AdKMr73DKRlYVq6NcaOjo1EU8rAy4abpIptH2EB +orz7bQTP3BxEuAMthBZMpR9UJgbQe0FZ+C7oV3nZSZWXpcO+/GtTpEv1Y6+2w1hpxhzHlocR Iu0GKT1SLhG6gpNPuySvQmOSMsejZR9xqDRtaYtT+NPpr20NGubFJ/LYy30liG6+84SU6Dl4y YFmQzM0N+FaiExSwXgR3s6gcd8K7F4jnKcCWG/LFcqVjxfaL1nojsM38sUOxZA5oQIYJL5sfH 4NIs+peVXkRAk8Wud3xTsHKFCe1TXo9qAMpZgToNCPlk0+QOnBAOnSe5GcHzIKwxhuEt+k7xo 5ig0Cfwjtz4THihWjElIZGKYTVX7d5rHpacBT8aoCB6ntRD8aD2IUj+8DDbQWiK+yLb9iIlBQ xWO5XV6cCBBxVC9KQePFSn9ivuazUvC14O3qRStXsI9ZezDqoYnkAX7m/ZdHdh//0vEjoRpCM wcDWBHe Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 21 Aug 2016 07:07:08 +0200 Do not use curly brackets at some source code places where a single statement should be sufficient. Signed-off-by: Markus Elfring --- drivers/scsi/aacraid/commctrl.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 49a664f..9f4ddb0 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c @@ -66,13 +66,11 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) unsigned int size, osize; int retval; - if (dev->in_reset) { + if (dev->in_reset) return -EBUSY; - } fibptr = aac_fib_alloc(dev); - if(fibptr == NULL) { + if (!fibptr) return -ENOMEM; - } kfib = fibptr->hw_fib_va; /* @@ -138,9 +136,8 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) retval = aac_fib_send(le16_to_cpu(kfib->header.Command), fibptr, le16_to_cpu(kfib->header.Size) , FsaNormal, 1, 1, NULL, NULL); - if (retval) { + if (retval) goto cleanup; - } if (aac_fib_complete(fibptr) != 0) { retval = -EINVAL; goto cleanup; @@ -228,12 +225,10 @@ static int open_getadapter_fib(struct aac_dev * dev, void __user *arg) } list_add_tail(&fibctx->next, &dev->fib_list); spin_unlock_irqrestore(&dev->fib_lock, flags); - if (copy_to_user(arg, &fibctx->unique, - sizeof(fibctx->unique))) { + if (copy_to_user(arg, &fibctx->unique, sizeof(fibctx->unique))) status = -EFAULT; - } else { + else status = 0; - } } return status; } @@ -820,9 +815,8 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) free_user_srbcmd: kfree(user_srbcmd); free_sg_list: - for(i=0; i <= sg_indx; i++){ + for (i = 0; i <= sg_indx; i++) kfree(sg_list[i]); - } if (rcode != -ERESTARTSYS) { aac_fib_complete(srbfib); aac_fib_free(srbfib);