From patchwork Tue Aug 9 21:11:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartley Sweeten X-Patchwork-Id: 1051162 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p79LC89l000311 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 9 Aug 2011 21:12:30 GMT Received: from canuck.infradead.org ([134.117.69.58]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qqtai-0003SQ-3g; Tue, 09 Aug 2011 21:12:00 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qqtah-00010D-KS; Tue, 09 Aug 2011 21:11:59 +0000 Received: from mail131.messagelabs.com ([216.82.242.99]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qqtae-0000zu-7i for linux-arm-kernel@lists.infradead.org; Tue, 09 Aug 2011 21:11:57 +0000 X-VirusChecked: Checked X-Env-Sender: hartleys@visionengravers.com X-Msg-Ref: server-6.tower-131.messagelabs.com!1312924312!12472393!3 X-StarScan-Version: 6.2.17; banners=-,-,- X-Originating-IP: [216.166.12.99] Received: (qmail 7492 invoked from network); 9 Aug 2011 21:11:53 -0000 Received: from out001.collaborationhost.net (HELO out001.collaborationhost.net) (216.166.12.99) by server-6.tower-131.messagelabs.com with RC4-SHA encrypted SMTP; 9 Aug 2011 21:11:53 -0000 Received: from etch.local (10.2.3.210) by smtp.collaborationhost.net (10.2.0.100) with Microsoft SMTP Server (TLS) id 8.3.137.0; Tue, 9 Aug 2011 16:11:53 -0500 From: H Hartley Sweeten To: ARM Kernel Subject: [PATCH] ep93xx: clock.c: fix all checkpatch.pl issues Date: Tue, 9 Aug 2011 14:11:32 -0700 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Disposition: inline Message-ID: <201108091411.32479.hartleys@visionengravers.com> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110809_171156_403677_7C1A7834 X-CRM114-Status: GOOD ( 13.65 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [216.82.242.99 listed in list.dnswl.org] Cc: rmallon@gmail.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 09 Aug 2011 21:12:30 +0000 (UTC) This fixes all the checkpatch.pl errors and warnings found in this file. #201: ERROR: space required after that ',' (ctx:VxV) #201: ERROR: space required after that ',' (ctx:VxV) #250: WARNING: line over 80 characters #281: WARNING: line over 80 characters #361: WARNING: line over 80 characters #435: ERROR: trailing whitespace #438: ERROR: trailing whitespace #449: ERROR: trailing whitespace #451: ERROR: trailing whitespace total: 6 errors, 3 warnings, 562 lines checked Signed-off-by: H Hartley Sweeten Cc: Ryan Mallon diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index ca4de71..14dba95 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c @@ -198,7 +198,7 @@ static struct clk clk_m2m1 = { .enable_mask = EP93XX_SYSCON_PWRCNT_DMA_M2M1, }; -#define INIT_CK(dev,con,ck) \ +#define INIT_CK(dev, con, ck) \ { .dev_id = dev, .con_id = con, .clk = ck } static struct clk_lookup clocks[] = { @@ -247,7 +247,8 @@ static void __clk_enable(struct clk *clk) v = __raw_readl(clk->enable_reg); v |= clk->enable_mask; if (clk->sw_locked) - ep93xx_syscon_swlocked_write(v, clk->enable_reg); + ep93xx_syscon_swlocked_write(v, + clk->enable_reg); else __raw_writel(v, clk->enable_reg); } @@ -278,7 +279,8 @@ static void __clk_disable(struct clk *clk) v = __raw_readl(clk->enable_reg); v &= ~clk->enable_mask; if (clk->sw_locked) - ep93xx_syscon_swlocked_write(v, clk->enable_reg); + ep93xx_syscon_swlocked_write(v, + clk->enable_reg); else __raw_writel(v, clk->enable_reg); } @@ -358,7 +360,7 @@ static int calc_clk_div(struct clk *clk, unsigned long rate, int i, found = 0, __div = 0, __pdiv = 0; /* Don't exceed the maximum rate */ - max_rate = max3(clk_pll1.rate / 4, clk_pll2.rate / 4, clk_xtali.rate / 4); + max_rate = max3(clk_pll1.rate/4, clk_pll2.rate/4, clk_xtali.rate/4); rate = min(rate, max_rate); /* @@ -432,35 +434,32 @@ static int set_i2s_sclk_rate(struct clk *clk, unsigned long rate) unsigned val = __raw_readl(clk->enable_reg); if (rate == clk_i2s_mclk.rate / 2) - ep93xx_syscon_swlocked_write(val & ~EP93XX_I2SCLKDIV_SDIV, - clk->enable_reg); + val &= ~EP93XX_I2SCLKDIV_SDIV; else if (rate == clk_i2s_mclk.rate / 4) - ep93xx_syscon_swlocked_write(val | EP93XX_I2SCLKDIV_SDIV, - clk->enable_reg); + val |= EP93XX_I2SCLKDIV_SDIV; else return -EINVAL; + ep93xx_syscon_swlocked_write(val, clk->enable_reg); clk_i2s_sclk.rate = rate; return 0; } static int set_i2s_lrclk_rate(struct clk *clk, unsigned long rate) { - unsigned val = __raw_readl(clk->enable_reg) & + unsigned val = __raw_readl(clk->enable_reg) & ~EP93XX_I2SCLKDIV_LRDIV_MASK; - + if (rate == clk_i2s_sclk.rate / 32) - ep93xx_syscon_swlocked_write(val | EP93XX_I2SCLKDIV_LRDIV32, - clk->enable_reg); + val |= EP93XX_I2SCLKDIV_LRDIV32; else if (rate == clk_i2s_sclk.rate / 64) - ep93xx_syscon_swlocked_write(val | EP93XX_I2SCLKDIV_LRDIV64, - clk->enable_reg); + val |= EP93XX_I2SCLKDIV_LRDIV64; else if (rate == clk_i2s_sclk.rate / 128) - ep93xx_syscon_swlocked_write(val | EP93XX_I2SCLKDIV_LRDIV128, - clk->enable_reg); + val |= EP93XX_I2SCLKDIV_LRDIV128; else return -EINVAL; + ep93xx_syscon_swlocked_write(val, clk->enable_reg); clk_i2s_lrclk.rate = rate; return 0; }