From patchwork Sat May 9 21:44:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 6370671 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 30172BEEE1 for ; Sat, 9 May 2015 21:45:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E7E020386 for ; Sat, 9 May 2015 21:45:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 779652013D for ; Sat, 9 May 2015 21:45:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752031AbbEIVp1 (ORCPT ); Sat, 9 May 2015 17:45:27 -0400 Received: from mail-qg0-f51.google.com ([209.85.192.51]:36416 "EHLO mail-qg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751975AbbEIVp1 (ORCPT ); Sat, 9 May 2015 17:45:27 -0400 Received: by qgeb100 with SMTP id b100so51969823qge.3 for ; Sat, 09 May 2015 14:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fXsj3efRae7BslFnGhgidWt0Z/Z93MrxvQ/fdxrCoK4=; b=GZBqhW6koM3pJaWjVTMTgR7ocDEQ1ztxLh6tPC1pbh6YcFSUeobr2Z0bSzu46rUlBX alR59nK2Ab9mlj1tZZcm+5yLx/qb3OKCvMvsLgZxYZkyZjDpVkygwyJ+zr/1bOropDYv B45SZ7PHJMPp+llfEw2+d4rWFv2dfU1jqIpTheRV1/khD2MZIFlEz/FpN7rn6K/uIRdz rHgNS2mGEn1hiLXJ9lj6rd0l18vPxi1LCiPyIISSgVbQcpC/Qi7DvsBqIHUcpqx7NjS3 s/h3BWZ1UDyagIJ3dl2+WhWOXNRra7LjTJ+v2ysD33HwVQziYl8bF/+gWVaIaXZrOEo5 pd/A== X-Received: by 10.140.235.216 with SMTP id g207mr5565458qhc.80.1431207926352; Sat, 09 May 2015 14:45:26 -0700 (PDT) Received: from localhost.localdomain ([186.207.90.56]) by mx.google.com with ESMTPSA id z198sm6578389qhd.44.2015.05.09.14.45.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 09 May 2015 14:45:25 -0700 (PDT) From: Fabio Estevam To: ulf.hansson@linaro.org Cc: linux-mmc@vger.kernel.org, Fabio Estevam Subject: [PATCH 2/3] mmc: host: mxcmmc: Simplify a trivial if-return sequence Date: Sat, 9 May 2015 18:44:50 -0300 Message-Id: <1431207891-21448-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431207891-21448-1-git-send-email-festevam@gmail.com> References: <1431207891-21448-1-git-send-email-festevam@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam Simplify a trivial if-return sequence. Possibly combine with a preceding function call. The semantic patch that makes this change is available in scripts/coccinelle/misc/simple_return.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Fabio Estevam --- drivers/mmc/host/mxcmmc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 317d709..d110f9e 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -605,11 +605,7 @@ static int mxcmci_push(struct mxcmci_host *host, void *_buf, int bytes) mxcmci_writel(host, cpu_to_le32(tmp), MMC_REG_BUFFER_ACCESS); } - stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); - if (stat) - return stat; - - return 0; + return mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); } static int mxcmci_transfer_data(struct mxcmci_host *host)