From patchwork Wed Jan 22 11:46:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nazzareno Trimarchi X-Patchwork-Id: 3522711 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7DB6A9F2E9 for ; Wed, 22 Jan 2014 11:47:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1CF720035 for ; Wed, 22 Jan 2014 11:47:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8EFB020155 for ; Wed, 22 Jan 2014 11:47:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755372AbaAVLr1 (ORCPT ); Wed, 22 Jan 2014 06:47:27 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:40539 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755358AbaAVLqN (ORCPT ); Wed, 22 Jan 2014 06:46:13 -0500 Received: by mail-wi0-f171.google.com with SMTP id cc10so5518143wib.4 for ; Wed, 22 Jan 2014 03:46:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EdXbQJzbMvKuE7GQrUSRtGNaV3D4rTR8rubKxuDtESo=; b=JE78LJWtBVW5ZlLH//dNMAB8MZ95G0laaeVK81RZ143IC5rNUSDTa45+613DO4FNau 5sb1rtwykkN5ZyDXsIsoid498pm9+EZ7CN5kmY9LFP6caB/Vn4FUz5VSbBlG4HE/41sJ EclOypY+HSxvCL4RGzclI1XKu4BOvD+TC5hJIuvLKq+UQRiMSDDiVxY3ae8Ai0WHwgfl lecGb9uSi9eeR6iTzlFVCU3t5SN0IY3Wywb6bER4GSVHojz2+b+FK2tScF0jgj7ujO0s zxulrAq2VFnaaBnM/OPnLwej08dUXj8YMcAU0uMPtb8D5v+9PNEUXOz27iaQ9oeHhlpt mfGg== X-Gm-Message-State: ALoCoQmnuF/tBWGCzCOpjmcyIiKtnqWsxAvIgDG1fkf1kEkn6oAHvoY7Q/2oY3O6JqFmBex6Pb+r X-Received: by 10.194.60.162 with SMTP id i2mr1132681wjr.91.1390391172539; Wed, 22 Jan 2014 03:46:12 -0800 (PST) Received: from panicking.ipgroup.local (212-57-59-66.xdsl.deanconnect.nl. [212.57.59.66]) by mx.google.com with ESMTPSA id kr10sm14297368wjc.22.2014.01.22.03.46.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 03:46:11 -0800 (PST) From: Michael Trimarchi To: linux-mmc@vger.kernel.org Cc: Chris Ball , linux-kernel@vger.kernel.org, Sekhar Nori , Manjunathappa Prakash Subject: [RFC PATCH 2/3] ARM: mmc: davinci: Remove cast to the same type Date: Wed, 22 Jan 2014 12:46:04 +0100 Message-Id: <1390391165-27906-3-git-send-email-michael@amarulasolutions.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1390391165-27906-1-git-send-email-michael@amarulasolutions.com> References: <1390391165-27906-1-git-send-email-michael@amarulasolutions.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=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Signed-off-by: Michael Trimarchi --- drivers/mmc/host/davinci_mmc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index 8ea09ef..13ac664 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -212,7 +212,7 @@ struct mmc_davinci_host { bool active_request; /* For PIO we walk scatterlists one segment at a time. */ - unsigned int sg_len; + unsigned int sg_len; struct scatterlist *sg; /* Version of the MMC/SD controller */ @@ -660,13 +660,11 @@ static unsigned int calculate_freq_for_card(struct mmc_davinci_host *host, mmc_pclk = host->mmc_input_clk; if (mmc_req_freq && mmc_pclk > (2 * mmc_req_freq)) - mmc_push_pull_divisor = ((unsigned int)mmc_pclk - / (2 * mmc_req_freq)) - 1; + mmc_push_pull_divisor = (mmc_pclk / (2 * mmc_req_freq)) - 1; else mmc_push_pull_divisor = 0; - mmc_freq = (unsigned int)mmc_pclk - / (2 * (mmc_push_pull_divisor + 1)); + mmc_freq = mmc_pclk / (2 * (mmc_push_pull_divisor + 1)); if (mmc_freq > mmc_req_freq) mmc_push_pull_divisor = mmc_push_pull_divisor + 1; @@ -693,7 +691,7 @@ static void calculate_clk_divider(struct mmc_host *mmc, struct mmc_ios *ios) /* Ignoring the init clock value passed for fixing the inter * operability with different cards. */ - open_drain_freq = ((unsigned int)host->mmc_input_clk + open_drain_freq = (host->mmc_input_clk / (2 * MMCSD_INIT_CLOCK)) - 1; if (open_drain_freq > 0xFF)