From patchwork Wed Dec 12 14:38:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 1867271 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id BC475DF215 for ; Wed, 12 Dec 2012 14:38:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754355Ab2LLOid (ORCPT ); Wed, 12 Dec 2012 09:38:33 -0500 Received: from moutng.kundenserver.de ([212.227.126.187]:58916 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754398Ab2LLOi0 (ORCPT ); Wed, 12 Dec 2012 09:38:26 -0500 Received: from axis700.grange (dslb-146-060-250-080.pools.arcor-ip.net [146.60.250.80]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MasOo-1TPcfd1lpy-00KR1W; Wed, 12 Dec 2012 15:38:23 +0100 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id AE4CC105F0; Wed, 12 Dec 2012 15:38:21 +0100 (CET) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1TinRy-0004iK-V2; Wed, 12 Dec 2012 15:38:18 +0100 From: Guennadi Liakhovetski To: linux-mmc@vger.kernel.org Cc: linux-sh@vger.kernel.org, Magnus Damm , Chris Ball Subject: [PATCH 09/14] mmc: sh-mmcif: (cosmetic) simplify boolean return blocks Date: Wed, 12 Dec 2012 15:38:13 +0100 Message-Id: <1355323098-18061-10-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1355323098-18061-1-git-send-email-g.liakhovetski@gmx.de> References: <1355323098-18061-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:8RDEY41iPb+HTeK408GiW6zF1iE35ThAPOQyzEY4Xhl V5AgUyBkd72GuliauI2G/LqIkmv428WC+ULXKHDKLRb5h7i2pw 0UlLK7GlwEIDRZ+xPi6j1FSSABPc3BEWVnez0c4Iy9aLukeXi7 Wn1dHf46BlMs+N4zbRkaOquIWU3w3kz3HI365urVlNOpZuytoe FBohOAUHeaXhkq0DZHcc4xZnubhWthEeD2xPHSXQm1iRfb0ZJ2 gX2vlfERnXnsre3dWlAYle9IEe8gdCFOuQZO/BErQwh85DjGrY hKtsIF1OW8wnWnQJZ4tXfNxx+tG6Wq4XWzBF9A7Hh7Su7AFsLL xpoNX0RGN48Is9gBH1M1HK/TLePLR9LLJXtXcwhHWokvQJcMZX fyjutEGbNdrzJ57Hsf5izx6EM4s8S3B5RM= Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Use "return condition" instead of "if (condition) return true; return false" in functions, returning bool. Signed-off-by: Guennadi Liakhovetski --- drivers/mmc/host/sh_mmcif.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index d8d65c0..1a7c602 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -542,10 +542,7 @@ static bool sh_mmcif_next_block(struct sh_mmcif_host *host, u32 *p) host->pio_ptr = p; } - if (host->sg_idx == data->sg_len) - return false; - - return true; + return host->sg_idx != data->sg_len; } static void sh_mmcif_single_read(struct sh_mmcif_host *host, @@ -1071,9 +1068,7 @@ static bool sh_mmcif_end_cmd(struct sh_mmcif_host *host) if (!host->dma_active) { data->error = sh_mmcif_data_trans(host, host->mrq, cmd->opcode); - if (!data->error) - return true; - return false; + return !data->error; } /* Running in the IRQ thread, can sleep */