All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: sirf: fix a bundle of checkpatch issues
@ 2014-04-15  2:40 Barry Song
  2014-04-15  5:01 ` Uwe Kleine-König
  0 siblings, 1 reply; 3+ messages in thread
From: Barry Song @ 2014-04-15  2:40 UTC (permalink / raw)
  To: linux-arm-kernel

From: Bin Shi <Bin.Shi@csr.com>

fix the below checkpatch issues about which users of codes - key customers care
very much.

WARNING: line over 80 characters
66: FILE: clk-atlas6.c:66:
+	usp2,   vip,   gfx,   gfx2d,    lcd,   vpp,   mmc01, mmc23,    mmc45, usbpll,

total: 0 errors, 1 warnings, 153 lines checked

clk-atlas6.c has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
WARNING: line over 80 characters
24: FILE: clk-common.c:24:
+ *     Each clock domain can select its own clock source from five clock sources,
WARNING: line over 80 characters
25: FILE: clk-common.c:25:
+ *     X_XIN, X_XINW, PLL1, PLL2 and PLL3. The domain clock is used as the source

WARNING: line over 80 characters
171: FILE: clk-common.c:171:
+	return pll_clk_round_rate(__clk_get_hw(parent_clk), rate, &pll_parent_rate);

WARNING: static const char * array should probably be static const char * const
191: FILE: clk-common.c:191:
+static const char *pll_clk_parents[] = {

WARNING: line over 80 characters
260: FILE: clk-common.c:260:
+static unsigned long usb_pll_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)

WARNING: static const char * array should probably be static const char * const
287: FILE: clk-common.c:287:
+static const char *dmn_clk_parents[] = {

WARNING: static const char * array should probably be static const char * const
676: FILE: clk-common.c:676:
+static const char *std_clk_io_parents[] = {

WARNING: static const char * array should probably be static const char * const
952: FILE: clk-common.c:952:
+static const char *std_clk_dsp_parents[] = {

WARNING: static const char * array should probably be static const char * const
984: FILE: clk-common.c:984:
+static const char *std_clk_sys_parents[] = {

WARNING: static const char * array should probably be static const char * const
1002: FILE: clk-common.c:1002:
+static const char *std_clk_usb_parents[] = {

total: 0 errors, 10 warnings, 1032 lines checked

clk-common.c has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 1032 lines checked

clk-common.c.orig has no obvious style problems and is ready for submission.
WARNING: line over 80 characters
65: FILE: clk-prima2.c:65:
+	usp2,   vip,   gfx,   mm,    lcd,   vpp,   mmc01, mmc23,    mmc45, usbpll,

total: 0 errors, 1 warnings, 152 lines checked

Signed-off-by: Bin Shi <Bin.Shi@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
---
 drivers/clk/sirf/clk-atlas6.c |    8 ++++----
 drivers/clk/sirf/clk-common.c |   22 ++++++++++++----------
 drivers/clk/sirf/clk-prima2.c |   10 +++++-----
 3 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/drivers/clk/sirf/clk-atlas6.c b/drivers/clk/sirf/clk-atlas6.c
index d63b76c..b068feb 100644
--- a/drivers/clk/sirf/clk-atlas6.c
+++ b/drivers/clk/sirf/clk-atlas6.c
@@ -60,10 +60,10 @@ static struct clk_dmn clk_nand = {
 
 enum atlas6_clk_index {
 	/* 0    1     2      3      4      5      6       7         8      9 */
-	rtc,    osc,   pll1,  pll2,  pll3,  mem,   sys,   security, dsp,   gps,
-	mf,     io,    cpu,   uart0, uart1, uart2, tsc,   i2c0,     i2c1,  spi0,
-	spi1,   pwmc,  efuse, pulse, dmac0, dmac1, nand,  audio,    usp0,  usp1,
-	usp2,   vip,   gfx,   gfx2d,    lcd,   vpp,   mmc01, mmc23,    mmc45, usbpll,
+	rtc,  osc,   pll1,  pll2,  pll3,  mem,   sys,   security, dsp,   gps,
+	mf,   io,    cpu,   uart0, uart1, uart2, tsc,   i2c0,     i2c1,  spi0,
+	spi1, pwmc,  efuse, pulse, dmac0, dmac1, nand,  audio,    usp0,  usp1,
+	usp2, vip,   gfx,   gfx2d, lcd,   vpp,   mmc01, mmc23,    mmc45, usbpll,
 	usb0,  usb1,   cphif, maxclk,
 };
 
diff --git a/drivers/clk/sirf/clk-common.c b/drivers/clk/sirf/clk-common.c
index 37af51c..aebaec01 100644
--- a/drivers/clk/sirf/clk-common.c
+++ b/drivers/clk/sirf/clk-common.c
@@ -21,8 +21,8 @@ static struct clk_onecell_data clk_data;
  * - 2 exclusive plls: usb phy pll and sata phy pll
  * - 8 clock domains: cpu/cpudiv, mem/memdiv, sys/io, dsp, graphic, multimedia,
  *     display and sdphy.
- *     Each clock domain can select its own clock source from five clock sources,
- *     X_XIN, X_XINW, PLL1, PLL2 and PLL3. The domain clock is used as the source
+ *     Each clock domain can select its own clock source from 5 clock sources,
+ *     X_XIN, X_XINW, PLL1, PLL2 & PLL3. Domain clock is used as the source
  *     clock of the group clock.
  *     - dsp domain: gps, mf
  *     - io domain: dmac, nand, audio, uart, i2c, spi, usp, pwm, pulse
@@ -168,7 +168,8 @@ static long cpu_clk_round_rate(struct clk_hw *hw, unsigned long rate,
 	struct clk *parent_clk = clk_get_parent(hw->clk);
 	struct clk *pll_parent_clk = clk_get_parent(parent_clk);
 	unsigned long pll_parent_rate = clk_get_rate(pll_parent_clk);
-	return pll_clk_round_rate(__clk_get_hw(parent_clk), rate, &pll_parent_rate);
+	return pll_clk_round_rate(__clk_get_hw(parent_clk),
+		rate, &pll_parent_rate);
 }
 
 static unsigned long cpu_clk_recalc_rate(struct clk_hw *hw,
@@ -188,7 +189,7 @@ static struct clk_ops std_pll_ops = {
 	.set_rate = pll_clk_set_rate,
 };
 
-static const char *pll_clk_parents[] = {
+static const char * const pll_clk_parents[] = {
 	"osc",
 };
 
@@ -257,7 +258,8 @@ static void usb_pll_clk_disable(struct clk_hw *clk)
 	writel(reg, sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL);
 }
 
-static unsigned long usb_pll_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
+static unsigned long usb_pll_clk_recalc_rate(struct clk_hw *hw,
+	unsigned long parent_rate)
 {
 	u32 reg = readl(sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL);
 	return (reg & SIRFSOC_USBPHY_PLL_BYPASS) ? parent_rate : 48*MHZ;
@@ -284,7 +286,7 @@ static struct clk_hw usb_pll_clk_hw = {
  * clock domains - cpu, mem, sys/io, dsp, gfx
  */
 
-static const char *dmn_clk_parents[] = {
+static const char * const dmn_clk_parents[] = {
 	"rtc",
 	"osc",
 	"pll1",
@@ -673,7 +675,7 @@ static void std_clk_disable(struct clk_hw *hw)
 	clkc_writel(val, reg);
 }
 
-static const char *std_clk_io_parents[] = {
+static const char * const std_clk_io_parents[] = {
 	"io",
 };
 
@@ -949,7 +951,7 @@ static struct clk_std clk_pulse = {
 	},
 };
 
-static const char *std_clk_dsp_parents[] = {
+static const char * const std_clk_dsp_parents[] = {
 	"dsp",
 };
 
@@ -981,7 +983,7 @@ static struct clk_std clk_mf = {
 	},
 };
 
-static const char *std_clk_sys_parents[] = {
+static const char * const std_clk_sys_parents[] = {
 	"sys",
 };
 
@@ -999,7 +1001,7 @@ static struct clk_std clk_security = {
 	},
 };
 
-static const char *std_clk_usb_parents[] = {
+static const char * const std_clk_usb_parents[] = {
 	"usb_pll",
 };
 
diff --git a/drivers/clk/sirf/clk-prima2.c b/drivers/clk/sirf/clk-prima2.c
index 6968e2e..83d74c4 100644
--- a/drivers/clk/sirf/clk-prima2.c
+++ b/drivers/clk/sirf/clk-prima2.c
@@ -59,11 +59,11 @@ static struct clk_std clk_nand = {
 
 enum prima2_clk_index {
 	/* 0    1     2      3      4      5      6       7         8      9 */
-	rtc,    osc,   pll1,  pll2,  pll3,  mem,   sys,   security, dsp,   gps,
-	mf,     io,    cpu,   uart0, uart1, uart2, tsc,   i2c0,     i2c1,  spi0,
-	spi1,   pwmc,  efuse, pulse, dmac0, dmac1, nand,  audio,    usp0,  usp1,
-	usp2,   vip,   gfx,   mm,    lcd,   vpp,   mmc01, mmc23,    mmc45, usbpll,
-	usb0,  usb1,   cphif, maxclk,
+	rtc,  osc,  pll1,  pll2,  pll3,  mem,   sys,   security, dsp,   gps,
+	mf,   io,   cpu,   uart0, uart1, uart2, tsc,   i2c0,     i2c1,  spi0,
+	spi1, pwmc, efuse, pulse, dmac0, dmac1, nand,  audio,    usp0,  usp1,
+	usp2, vip,  gfx,   mm,    lcd,   vpp,   mmc01, mmc23,    mmc45, usbpll,
+	usb0, usb1, cphif, maxclk,
 };
 
 static __initdata struct clk_hw *prima2_clk_hw_array[maxclk] = {
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] clk: sirf: fix a bundle of checkpatch issues
  2014-04-15  2:40 [PATCH] clk: sirf: fix a bundle of checkpatch issues Barry Song
@ 2014-04-15  5:01 ` Uwe Kleine-König
  2014-04-15  9:10   ` Barry Song
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2014-04-15  5:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Tue, Apr 15, 2014 at 10:40:03AM +0800, Barry Song wrote:
> From: Bin Shi <Bin.Shi@csr.com>
> diff --git a/drivers/clk/sirf/clk-atlas6.c b/drivers/clk/sirf/clk-atlas6.c
> index d63b76c..b068feb 100644
> --- a/drivers/clk/sirf/clk-atlas6.c
> +++ b/drivers/clk/sirf/clk-atlas6.c
> @@ -60,10 +60,10 @@ static struct clk_dmn clk_nand = {
>  
>  enum atlas6_clk_index {
>  	/* 0    1     2      3      4      5      6       7         8      9 */
> -	rtc,    osc,   pll1,  pll2,  pll3,  mem,   sys,   security, dsp,   gps,
> -	mf,     io,    cpu,   uart0, uart1, uart2, tsc,   i2c0,     i2c1,  spi0,
> -	spi1,   pwmc,  efuse, pulse, dmac0, dmac1, nand,  audio,    usp0,  usp1,
> -	usp2,   vip,   gfx,   gfx2d,    lcd,   vpp,   mmc01, mmc23,    mmc45, usbpll,
> +	rtc,  osc,   pll1,  pll2,  pll3,  mem,   sys,   security, dsp,   gps,
> +	mf,   io,    cpu,   uart0, uart1, uart2, tsc,   i2c0,     i2c1,  spi0,
> +	spi1, pwmc,  efuse, pulse, dmac0, dmac1, nand,  audio,    usp0,  usp1,
> +	usp2, vip,   gfx,   gfx2d, lcd,   vpp,   mmc01, mmc23,    mmc45, usbpll,
>  	usb0,  usb1,   cphif, maxclk,
Here only the indention is changed, right? I wonder why the last line
was not fixed to be aligned with the others.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] clk: sirf: fix a bundle of checkpatch issues
  2014-04-15  5:01 ` Uwe Kleine-König
@ 2014-04-15  9:10   ` Barry Song
  0 siblings, 0 replies; 3+ messages in thread
From: Barry Song @ 2014-04-15  9:10 UTC (permalink / raw)
  To: linux-arm-kernel

2014-04-15 13:01 GMT+08:00 Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>:
> Hello,
>
> On Tue, Apr 15, 2014 at 10:40:03AM +0800, Barry Song wrote:
>> From: Bin Shi <Bin.Shi@csr.com>
>> diff --git a/drivers/clk/sirf/clk-atlas6.c b/drivers/clk/sirf/clk-atlas6.c
>> index d63b76c..b068feb 100644
>> --- a/drivers/clk/sirf/clk-atlas6.c
>> +++ b/drivers/clk/sirf/clk-atlas6.c
>> @@ -60,10 +60,10 @@ static struct clk_dmn clk_nand = {
>>
>>  enum atlas6_clk_index {
>>       /* 0    1     2      3      4      5      6       7         8      9 */
>> -     rtc,    osc,   pll1,  pll2,  pll3,  mem,   sys,   security, dsp,   gps,
>> -     mf,     io,    cpu,   uart0, uart1, uart2, tsc,   i2c0,     i2c1,  spi0,
>> -     spi1,   pwmc,  efuse, pulse, dmac0, dmac1, nand,  audio,    usp0,  usp1,
>> -     usp2,   vip,   gfx,   gfx2d,    lcd,   vpp,   mmc01, mmc23,    mmc45, usbpll,
>> +     rtc,  osc,   pll1,  pll2,  pll3,  mem,   sys,   security, dsp,   gps,
>> +     mf,   io,    cpu,   uart0, uart1, uart2, tsc,   i2c0,     i2c1,  spi0,
>> +     spi1, pwmc,  efuse, pulse, dmac0, dmac1, nand,  audio,    usp0,  usp1,
>> +     usp2, vip,   gfx,   gfx2d, lcd,   vpp,   mmc01, mmc23,    mmc45, usbpll,
>>       usb0,  usb1,   cphif, maxclk,
> Here only the indention is changed, right? I wonder why the last line
> was not fixed to be aligned with the others.

careful enough, thanks! we can fix that by:
diff --git a/drivers/clk/sirf/clk-atlas6.c b/drivers/clk/sirf/clk-atlas6.c
index b068feb..bca0052 100644
--- a/drivers/clk/sirf/clk-atlas6.c
+++ b/drivers/clk/sirf/clk-atlas6.c
@@ -59,12 +59,12 @@ static struct clk_dmn clk_nand = {
 };

 enum atlas6_clk_index {
-       /* 0    1     2      3      4      5      6       7         8      9 */
-       rtc,  osc,   pll1,  pll2,  pll3,  mem,   sys,   security, dsp,   gps,
-       mf,   io,    cpu,   uart0, uart1, uart2, tsc,   i2c0,     i2c1,  spi0,
-       spi1, pwmc,  efuse, pulse, dmac0, dmac1, nand,  audio,    usp0,  usp1,
-       usp2, vip,   gfx,   gfx2d, lcd,   vpp,   mmc01, mmc23,    mmc45, usbpll,
-       usb0,  usb1,   cphif, maxclk,
+       /* 0    1     2      3      4      5      6       7       8      9 */
+       rtc,  osc,  pll1,  pll2,  pll3,  mem,   sys,   security, dsp,   gps,
+       mf,   io,   cpu,   uart0, uart1, uart2, tsc,   i2c0,     i2c1,  spi0,
+       spi1, pwmc, efuse, pulse, dmac0, dmac1, nand,  audio,    usp0,  usp1,
+       usp2, vip,  gfx,   gfx2d, lcd,   vpp,   mmc01, mmc23,    mmc45, usbpll,
+       usb0, usb1, cphif, maxclk,
 };


>
> Best regards
> Uwe

-barry

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-15  9:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-15  2:40 [PATCH] clk: sirf: fix a bundle of checkpatch issues Barry Song
2014-04-15  5:01 ` Uwe Kleine-König
2014-04-15  9:10   ` Barry Song

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.