From patchwork Wed Apr 3 14:08:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amar X-Patchwork-Id: 15868 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B9F5623E21 for ; Wed, 3 Apr 2013 13:52:10 +0000 (UTC) Received: from mail-ye0-f200.google.com (mail-ye0-f200.google.com [209.85.213.200]) by fiordland.canonical.com (Postfix) with ESMTP id A1E3AA1874D for ; Wed, 3 Apr 2013 13:52:09 +0000 (UTC) Received: by mail-ye0-f200.google.com with SMTP id r11sf2070723yen.11 for ; Wed, 03 Apr 2013 06:52:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-auditid:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-brightmail-tracker:x-brightmail-tracker :dlp-filter:x-mtr:x-cfilter-loop:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe; bh=cgrFgXexzCce8CNz2gff2hCnLCq54OOi6nxpNvYIA7o=; b=ctj6PbbVFIcWmLjYx09HfAxVgaGeq9M4c5UOVhNxCASfv5Zh/s48fr0gHhV/MWw8uu GV3QaBUtgWkFoQ3vN23YhP0rZeIsRCel73MRpmotsr9coZzJgA9s1OnO0Xv7p43bgwzz I2hBXMVmzKl6VMWqnBKKFbk9j7pw/gwiiYoppjbkDQKKYaHB2jw4Wy4dwY7v2H++GcjR xj6R7p3zE/PUknGPm+Im4kh4VvN6A0zH/lk/TrKjt2ZSIHxwdx49xCBMjaxeYWuvpgK1 DYWCNWs7DZoR4R3nYogOne0sv7lyXy8ZmXx+brtRfWENhee9v2V8Is/9Az7MyQ86YIj+ qjag== X-Received: by 10.224.172.200 with SMTP id m8mr1145993qaz.0.1364997129188; Wed, 03 Apr 2013 06:52:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.40.198 with SMTP id z6ls879425qek.71.gmail; Wed, 03 Apr 2013 06:52:09 -0700 (PDT) X-Received: by 10.52.74.34 with SMTP id q2mr1057495vdv.76.1364997128727; Wed, 03 Apr 2013 06:52:08 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id a1si4906595vdk.34.2013.04.03.06.52.08 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 06:52:08 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id 15so1722357vea.29 for ; Wed, 03 Apr 2013 06:52:08 -0700 (PDT) X-Received: by 10.58.224.101 with SMTP id rb5mr1285930vec.17.1364997128622; Wed, 03 Apr 2013 06:52:08 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp171254ved; Wed, 3 Apr 2013 06:52:07 -0700 (PDT) X-Received: by 10.68.25.138 with SMTP id c10mr2621650pbg.133.1364997127407; Wed, 03 Apr 2013 06:52:07 -0700 (PDT) Received: from mailout1.samsung.com (mailout1.samsung.com. [203.254.224.24]) by mx.google.com with ESMTP id pc5si6792999pac.342.2013.04.03.06.52.06; Wed, 03 Apr 2013 06:52:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of amarendra.xt@samsung.com designates 203.254.224.24 as permitted sender) client-ip=203.254.224.24; Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKO000DAMIUNF10@mailout1.samsung.com>; Wed, 03 Apr 2013 22:52:06 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.122]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 26.69.20872.5043C515; Wed, 03 Apr 2013 22:52:05 +0900 (KST) X-AuditID: cbfee68d-b7f786d000005188-ac-515c3405d32c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id DE.B1.13494.5043C515; Wed, 03 Apr 2013 22:52:05 +0900 (KST) Received: from chrome-ubuntu.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MKO00KW6MDEHT20@mmp2.samsung.com>; Wed, 03 Apr 2013 22:52:05 +0900 (KST) From: Amar To: u-boot@lists.denx.de, mk7.kang@samsung.com Cc: patches@linaro.org, sjg@chromium.org, chander.kashyap@linaro.org, afleming@gmail.com, jh80.chung@samsung.com, u-boot-review@google.com Subject: [PATCH V8 5/9] EXYNOS5: DWMMC: Initialise the local variable to avoid unwanted results. Date: Wed, 03 Apr 2013 10:08:29 -0400 Message-id: <1364998113-13428-6-git-send-email-amarendra.xt@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1364998113-13428-1-git-send-email-amarendra.xt@samsung.com> References: <1364998113-13428-1-git-send-email-amarendra.xt@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRmVeSWpSXmKPExsWyRsSkSpfVJCbQYNUqG4sb13+yWTxcf5PF 4savNlaLjiMtjBZTDn9hsfi2ZRujxfLXG9kt3u7tZHfg8JjdcJHFY+esu+weCzaVety5tofN 4+ydHYwefVtWMQawRXHZpKTmZJalFunbJXBlLJ/bw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JifxYc8jdhCbU8BT4v28HUwgthBQzZ2jD1knMPIuYGRYxSiaWpBcUJyUnmukV5yY W1yal66XnJ+7iREcV8+kdzCuarA4xCjAwajEw3viS1SgEGtiWXFl7iFGCQ5mJRFezuPRgUK8 KYmVValF+fFFpTmpxYcYk4GumsgsJZqcD4z5vJJ4Q2MTc1NjU0sTCxMzS9KElcR5D7ZaBwoJ pCeWpGanphakFsFsYeLglGpgXDDVbprhzVqFrMV6IclOr9YJqfFufGW04pnDBQPNoIy/hdkr P56bEC35TP+S8Z23ti/ThdP6Yo7wcHS+X8JaJBXPWzLN7ezCyokyBQ8inygoGj5jcLfQrO97 JP657nqO94piRYPwy7Nz+LwMZLQjFpkUv+ZOub8zJ6dwoaIw+7TLyUu5LqkpsRRnJBpqMRcV JwIAPMhci+8CAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQn51wX+7UyD7gdpKdxXxyoHz68LH+lyEurVkdiCCtaMhJtkXCqqUYFVJtzV4pO9wsJtw3R9 X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch initialises the local variable 'shift' to zero. The uninitialised local variable 'shift' had garbage value and was resulting in unwnated results in the functions exynos5_get_mmc_clk() and exynos4_get_mmc_clk(). Signed-off-by: Amar Acked-by: Simon Glass Acked-by: Jaehoon Chung --- Changes since V1: 1)Updated the function exynos5_mmc_set_clk_div() to receive 'device_i'd as input parameter instead of 'index'. Changes since V2: 1)Updation of commit message and resubmition of proper patch set. Changes since V3: 1)Removed the new API exynos5_mmc_set_clk_div() from clock.c, because existing API set_mmc_clk() can be used to set mmc clock. Changes since V4: 1)Updated the subject line to reflect the changes present in this patch. 2)Changes of the file arch/arm/include/asm/arch-exynos/clk.h which were present in this patch, have been moved out of this patch. Changes since V5: No change. Changes since V6: No change. Changes since V7: No change. arch/arm/cpu/armv7/exynos/clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/exynos/clock.c b/arch/arm/cpu/armv7/exynos/clock.c index 223660a..cf3247a 100644 --- a/arch/arm/cpu/armv7/exynos/clock.c +++ b/arch/arm/cpu/armv7/exynos/clock.c @@ -613,7 +613,7 @@ static unsigned long exynos4_get_mmc_clk(int dev_index) (struct exynos4_clock *)samsung_get_base_clock(); unsigned long uclk, sclk; unsigned int sel, ratio, pre_ratio; - int shift; + int shift = 0; sel = readl(&clk->src_fsys); sel = (sel >> (dev_index << 2)) & 0xf; @@ -662,7 +662,7 @@ static unsigned long exynos5_get_mmc_clk(int dev_index) (struct exynos5_clock *)samsung_get_base_clock(); unsigned long uclk, sclk; unsigned int sel, ratio, pre_ratio; - int shift; + int shift = 0; sel = readl(&clk->src_fsys); sel = (sel >> (dev_index << 2)) & 0xf;