From patchwork Thu Jul 12 09:09:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kukjin Kim X-Patchwork-Id: 9952 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 0559723E3D for ; Thu, 12 Jul 2012 09:10:17 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id CA287A1866C for ; Thu, 12 Jul 2012 09:10:16 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id q6so2343367yen.11 for ; Thu, 12 Jul 2012 02:10:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :thread-index:content-language:x-brightmail-tracker:x-tm-as-mml :x-gm-message-state; bh=a5RcTChcJaE6wbllDFTEADjjDhSs2YcG2ecVW97EvtE=; b=cJwqmwfcw11kvG7wm29JqCeCgZQNIVktkIZQIT9Hy8cBl+MEf6XCCS+T3QJ81XmT9b NYWwBvQ+erTV7rnZ3gkGvg2xIMgba2oBGfsLAY3y+INXN22W2vrvKvOw6GzdhYtP62cr D+mFnpaGIM0naOJdQk30iWUjtfygo0ihSS11v2ruSUteoXtaNVM+MoMxdDZbBJyI4ywu 3Bf4K/kcSWmFlWA/8Ksu8VOcrKn8zKxpE1MKlc6h5S/ySkYV5pRZuybNIqZmqjk3WLz9 RJTSKlkrRuuFpqyRvJVt3ytgyQ+xGShIF0Yh9U3zHsO5G27TLlVoeqmGEhqpcvXmlHti /a3A== Received: by 10.50.195.234 with SMTP id ih10mr16960689igc.0.1342084216419; Thu, 12 Jul 2012 02:10:16 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.241.2 with SMTP id lc2csp1018ibb; Thu, 12 Jul 2012 02:10:15 -0700 (PDT) Received: by 10.68.223.35 with SMTP id qr3mr3845608pbc.83.1342084215582; Thu, 12 Jul 2012 02:10:15 -0700 (PDT) Received: from mailout3.samsung.com (mailout3.samsung.com. [203.254.224.33]) by mx.google.com with ESMTP id vz5si8022990pbc.149.2012.07.12.02.10.15; Thu, 12 Jul 2012 02:10:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of kgene.kim@samsung.com designates 203.254.224.33 as permitted sender) client-ip=203.254.224.33; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of kgene.kim@samsung.com designates 203.254.224.33 as permitted sender) smtp.mail=kgene.kim@samsung.com Received: from epcpsbgm1.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M7100JUCIRXNJ20@mailout3.samsung.com>; Thu, 12 Jul 2012 18:09:56 +0900 (KST) X-AuditID: cbfee61a-b7f616d000004b7e-a9-4ffe94649d68 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 94.34.19326.4649EFF4; Thu, 12 Jul 2012 18:09:56 +0900 (KST) Received: from DOKGENEKIM03 ([12.23.119.152]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M71004MFISKIJ50@mmp2.samsung.com>; Thu, 12 Jul 2012 18:09:56 +0900 (KST) From: Kukjin Kim To: 'Sachin Kamat' , linux-samsung-soc@vger.kernel.org Cc: arnd@arndb.de, patches@linaro.org References: <1341899860-17979-1-git-send-email-sachin.kamat@linaro.org> In-reply-to: <1341899860-17979-1-git-send-email-sachin.kamat@linaro.org> Subject: RE: [PATCH 1/1] ARM: EXYNOS: Fix compilation warning in setup-usb-phy.c file Date: Thu, 12 Jul 2012 18:09:56 +0900 Message-id: <0fa801cd600e$1b1e6d80$515b4880$%kim@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac1eYPcmrsCCsgJ4RbCHZLe3+JQpgwBntGCQ Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsVy+t9jQd2UKf/8DS5e1rKYcvgLi8XJP72M Dkwed67tYQtgjOKySUnNySxLLdK3S+DK6D42h7lgn1jFnOuXGBsYNwt1MXJwSAiYSDT/lO5i 5AQyxSQu3FvP1sXIxSEkMJ1RYt25HlYI5y+jxKEJ25hAqtgENCQOv3/GDmKLCPhLnHl2nxlk ELOAqsThl3UgYSEBd4nb+xazgticAh4ST3dcBbOFBcIlOp8/AGtlASqf1ngZzOYVsJVY8bCb FcIWlPgx+R4LiM0soC4xad4iZghbW+LJuwusEDerSzz6qwtiiggYSfzbUwFRISKx78U7xgmM QrOQDJqFZNAsJINmIWlZwMiyilE0tSC5oDgpPddQrzgxt7g0L10vOT93EyM4nJ9J7WBc2WBx iFGAg1GJh1dg0j9/IdbEsuLK3EOMEhzMSiK8/blAId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rzG 3l/9hQTSE0tSs1NTC1KLYLJMHJxSDYxrdix8c1jy1PcIk72zzp/VFP2zfkvWHN8FHFmR7hcr dy/9rVZ1hmGSRfajrD+T993q1dzU4PTwvNRJlsZzPNNnuD+qsXMquTM9pOwI24qZdUrTti3e vD/10gTlXY9r2W4kbZxnf4IjeMqal9KzJ/T6fnNe93f5sycMnZesn/Qu/VF0/JK++yfrTUos xRmJhlrMRcWJAAjjTNpjAgAA X-TM-AS-MML: No X-Gm-Message-State: ALoCoQlRBFcgCwaiaujdPrt0t4D0SliB3/2lm2DYW31kU1UdJbhO+CbNNs1sUCwImiTRHZvWhVDA Sachin Kamat wrote: > > Fixes the following warning: > arch/arm/mach-exynos/setup-usb-phy.c: In function > ‘exynos4210_usb_phy_clkset’: > arch/arm/mach-exynos/setup-usb-phy.c:83:2: > warning: ‘phyclk’ may be used uninitialized in this function [- > Wuninitialized] > > Signed-off-by: Sachin Kamat > --- > arch/arm/mach-exynos/setup-usb-phy.c | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach- > exynos/setup-usb-phy.c > index d26deb7..1eaa0b0 100644 > --- a/arch/arm/mach-exynos/setup-usb-phy.c > +++ b/arch/arm/mach-exynos/setup-usb-phy.c > @@ -31,7 +31,6 @@ static void exynos4210_usb_phy_clkset(struct > platform_device *pdev) > struct clk *xusbxti_clk; > u32 phyclk; > > - > xusbxti_clk = clk_get(&pdev->dev, "xusbxti"); > if (xusbxti_clk && !IS_ERR(xusbxti_clk)) { > if (soc_is_exynos4210()) { > @@ -50,6 +49,8 @@ static void exynos4210_usb_phy_clkset(struct > platform_device *pdev) > phyclk |= EXYNOS4210_CLKSEL_48M; > break; > } > + clk_put(xusbxti_clk); > + writel(phyclk, EXYNOS4_PHYCLK); > } else if (soc_is_exynos4212() || soc_is_exynos4412()) { > /* set clock frequency for PLL */ > phyclk = readl(EXYNOS4_PHYCLK) & > ~EXYNOS4X12_CLKSEL_MASK; > @@ -76,11 +77,10 @@ static void exynos4210_usb_phy_clkset(struct > platform_device *pdev) > phyclk |= EXYNOS4X12_CLKSEL_24M; > break; > } > + clk_put(xusbxti_clk); > + writel(phyclk, EXYNOS4_PHYCLK); > } > - clk_put(xusbxti_clk); > } > - > - writel(phyclk, EXYNOS4_PHYCLK); > } > > static int exynos4210_usb_phy0_init(struct platform_device *pdev) > -- > 1.7.4.1 Well, I think, following is enough? And if you're ok on this, I will squash into your original one which is still in my tree. Thanks. Best regards, Kgene. --- Kukjin Kim , Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c index d26deb7..3f82414 100644 --- a/arch/arm/mach-exynos/setup-usb-phy.c +++ b/arch/arm/mach-exynos/setup-usb-phy.c @@ -31,7 +31,6 @@ static void exynos4210_usb_phy_clkset(struct platform_device *pdev) struct clk *xusbxti_clk; u32 phyclk; - xusbxti_clk = clk_get(&pdev->dev, "xusbxti"); if (xusbxti_clk && !IS_ERR(xusbxti_clk)) { if (soc_is_exynos4210()) { @@ -78,9 +77,8 @@ static void exynos4210_usb_phy_clkset(struct platform_device *pdev) } } clk_put(xusbxti_clk); + writel(phyclk, EXYNOS4_PHYCLK); } - - writel(phyclk, EXYNOS4_PHYCLK); } static int exynos4210_usb_phy0_init(struct platform_device *pdev)