* [PATCH] mach-ep93xx: checkpatch.pl cleanup
@ 2010-05-06 18:28 H Hartley Sweeten
2010-05-06 20:16 ` Ryan Mallon
0 siblings, 1 reply; 3+ messages in thread
From: H Hartley Sweeten @ 2010-05-06 18:28 UTC (permalink / raw)
To: linux-arm-kernel
This cleans up most the checkpatch.pl issues in mach-ep93xx.
ERROR: space required after that ',' (ctx:VxV)
WARNING: line over 80 characters
WARNING: please, no space before tabs
The file core.c still produces this warning:
WARNING: externs should be avoided in .c files
Due to two externs declared for functions in located in gpio.c.
Since these are __init functions, and not meant to be exposed,
these warnings were not fixed.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <ryan@bluewatersys.com>
---
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c
index 5f80092..31108d8 100644
--- a/arch/arm/mach-ep93xx/clock.c
+++ b/arch/arm/mach-ep93xx/clock.c
@@ -170,7 +170,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[] = {
@@ -215,7 +215,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);
}
@@ -246,7 +247,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);
}
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 8d3f77e..295e513 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -337,8 +337,8 @@ static struct platform_device ep93xx_ohci_device = {
.name = "ep93xx-ohci",
.id = -1,
.dev = {
- .dma_mask = &ep93xx_ohci_device.dev.coherent_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
+ .dma_mask = &ep93xx_ohci_device.dev.coherent_dma_mask,
},
.num_resources = ARRAY_SIZE(ep93xx_ohci_resources),
.resource = ep93xx_ohci_resources,
@@ -562,7 +562,7 @@ static struct platform_device ep93xx_fb_device = {
.dev = {
.platform_data = &ep93xxfb_data,
.coherent_dma_mask = DMA_BIT_MASK(32),
- .dma_mask = &ep93xx_fb_device.dev.coherent_dma_mask,
+ .dma_mask = &ep93xx_fb_device.dev.coherent_dma_mask,
},
.num_resources = ARRAY_SIZE(ep93xx_fb_resource),
.resource = ep93xx_fb_resource,
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
index cf547ad..68d72cd 100644
--- a/arch/arm/mach-ep93xx/gpio.c
+++ b/arch/arm/mach-ep93xx/gpio.c
@@ -118,7 +118,8 @@ static void ep93xx_gpio_irq_ack(unsigned int irq)
int port = line >> 3;
int port_mask = 1 << (line & 7);
- if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) {
+ if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) ==
+ IRQ_TYPE_EDGE_BOTH) {
gpio_int_type2[port] ^= port_mask; /* switch edge direction */
ep93xx_gpio_update_int_params(port);
}
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
index 38deaee..ed352ac 100644
--- a/arch/arm/mach-ep93xx/snappercl15.c
+++ b/arch/arm/mach-ep93xx/snappercl15.c
@@ -42,7 +42,7 @@
#define SNAPPERCL15_NAND_CEN (1 << 11) /* Chip enable (active low) */
#define SNAPPERCL15_NAND_RDY (1 << 14) /* Device ready */
-#define NAND_CTRL_ADDR(chip) (chip->IO_ADDR_W + 0x40)
+#define NAND_CTRL_ADDR(chip) (chip->IO_ADDR_W + 0x40)
static void snappercl15_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
unsigned int ctrl)
@@ -167,6 +167,6 @@ MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
.boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
- .timer = &ep93xx_timer,
+ .timer = &ep93xx_timer,
.init_machine = snappercl15_init_machine,
MACHINE_END
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 9553031..b981a71 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -182,7 +182,7 @@ static struct resource ts72xx_wdt_resources[] = {
static struct platform_device ts72xx_wdt_device = {
.name = "ts72xx-wdt",
.id = -1,
- .num_resources = ARRAY_SIZE(ts72xx_wdt_resources),
+ .num_resources = ARRAY_SIZE(ts72xx_wdt_resources),
.resource = ts72xx_wdt_resources,
};
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] mach-ep93xx: checkpatch.pl cleanup
2010-05-06 18:28 [PATCH] mach-ep93xx: checkpatch.pl cleanup H Hartley Sweeten
@ 2010-05-06 20:16 ` Ryan Mallon
2010-05-06 20:19 ` H Hartley Sweeten
0 siblings, 1 reply; 3+ messages in thread
From: Ryan Mallon @ 2010-05-06 20:16 UTC (permalink / raw)
To: linux-arm-kernel
H Hartley Sweeten wrote:
> This cleans up most the checkpatch.pl issues in mach-ep93xx.
>
> ERROR: space required after that ',' (ctx:VxV)
> WARNING: line over 80 characters
> WARNING: please, no space before tabs
>
> The file core.c still produces this warning:
>
> WARNING: externs should be avoided in .c files
>
> Due to two externs declared for functions in located in gpio.c.
> Since these are __init functions, and not meant to be exposed,
> these warnings were not fixed.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <ryan@bluewatersys.com>
I actually think this makes the file less readable in most cases:
> ---
>
> diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c
> index 5f80092..31108d8 100644
> --- a/arch/arm/mach-ep93xx/clock.c
> +++ b/arch/arm/mach-ep93xx/clock.c
> @@ -170,7 +170,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[] = {
> @@ -215,7 +215,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);
This is much harder to read than just having it on a single line, it
doesn't split nicely either.
> else
> __raw_writel(v, clk->enable_reg);
> }
> @@ -246,7 +247,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);
> }
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index 8d3f77e..295e513 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -337,8 +337,8 @@ static struct platform_device ep93xx_ohci_device = {
> .name = "ep93xx-ohci",
> .id = -1,
> .dev = {
> - .dma_mask = &ep93xx_ohci_device.dev.coherent_dma_mask,
> .coherent_dma_mask = DMA_BIT_MASK(32),
> + .dma_mask = &ep93xx_ohci_device.dev.coherent_dma_mask,
Breaks the indentation to fix the 80 column limit. Either way is not
perfect, just leave it as is.
> },
> .num_resources = ARRAY_SIZE(ep93xx_ohci_resources),
> .resource = ep93xx_ohci_resources,
> @@ -562,7 +562,7 @@ static struct platform_device ep93xx_fb_device = {
> .dev = {
> .platform_data = &ep93xxfb_data,
> .coherent_dma_mask = DMA_BIT_MASK(32),
> - .dma_mask = &ep93xx_fb_device.dev.coherent_dma_mask,
> + .dma_mask = &ep93xx_fb_device.dev.coherent_dma_mask,
> },
> .num_resources = ARRAY_SIZE(ep93xx_fb_resource),
> .resource = ep93xx_fb_resource,
> diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
> index cf547ad..68d72cd 100644
> --- a/arch/arm/mach-ep93xx/gpio.c
> +++ b/arch/arm/mach-ep93xx/gpio.c
> @@ -118,7 +118,8 @@ static void ep93xx_gpio_irq_ack(unsigned int irq)
> int port = line >> 3;
> int port_mask = 1 << (line & 7);
>
> - if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) {
> + if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) ==
> + IRQ_TYPE_EDGE_BOTH) {
That looks really ugly.
> gpio_int_type2[port] ^= port_mask; /* switch edge direction */
> ep93xx_gpio_update_int_params(port);
> }
> diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
> index 38deaee..ed352ac 100644
> --- a/arch/arm/mach-ep93xx/snappercl15.c
> +++ b/arch/arm/mach-ep93xx/snappercl15.c
> @@ -42,7 +42,7 @@
> #define SNAPPERCL15_NAND_CEN (1 << 11) /* Chip enable (active low) */
> #define SNAPPERCL15_NAND_RDY (1 << 14) /* Device ready */
>
> -#define NAND_CTRL_ADDR(chip) (chip->IO_ADDR_W + 0x40)
> +#define NAND_CTRL_ADDR(chip) (chip->IO_ADDR_W + 0x40)
This is okay.
> static void snappercl15_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
> unsigned int ctrl)
> @@ -167,6 +167,6 @@ MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
> .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100,
> .map_io = ep93xx_map_io,
> .init_irq = ep93xx_init_irq,
> - .timer = &ep93xx_timer,
> + .timer = &ep93xx_timer,
> .init_machine = snappercl15_init_machine,
> MACHINE_END
> diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
> index 9553031..b981a71 100644
> --- a/arch/arm/mach-ep93xx/ts72xx.c
> +++ b/arch/arm/mach-ep93xx/ts72xx.c
> @@ -182,7 +182,7 @@ static struct resource ts72xx_wdt_resources[] = {
> static struct platform_device ts72xx_wdt_device = {
> .name = "ts72xx-wdt",
> .id = -1,
> - .num_resources = ARRAY_SIZE(ts72xx_wdt_resources),
> + .num_resources = ARRAY_SIZE(ts72xx_wdt_resources),
> .resource = ts72xx_wdt_resources,
> };
>
I don't think it's worth making some lines less readable just to get
them under the 80 column limit.
~Ryan
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] mach-ep93xx: checkpatch.pl cleanup
2010-05-06 20:16 ` Ryan Mallon
@ 2010-05-06 20:19 ` H Hartley Sweeten
0 siblings, 0 replies; 3+ messages in thread
From: H Hartley Sweeten @ 2010-05-06 20:19 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday, May 06, 2010 1:17 PM, Ryan Mallon wrote:
> H Hartley Sweeten wrote:
>> This cleans up most the checkpatch.pl issues in mach-ep93xx.
>>
>> ERROR: space required after that ',' (ctx:VxV)
>> WARNING: line over 80 characters
>> WARNING: please, no space before tabs
>>
>> The file core.c still produces this warning:
>>
>> WARNING: externs should be avoided in .c files
>>
>> Due to two externs declared for functions in located in gpio.c.
>> Since these are __init functions, and not meant to be exposed,
>> these warnings were not fixed.
>>
>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Ryan Mallon <ryan@bluewatersys.com>
>
> I actually think this makes the file less readable in most cases:
Not a problem. I just happened to run the script to see what happened.
I'll just leave everything as-is for now.
Thanks,
Hartley
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-06 20:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 18:28 [PATCH] mach-ep93xx: checkpatch.pl cleanup H Hartley Sweeten
2010-05-06 20:16 ` Ryan Mallon
2010-05-06 20:19 ` H Hartley Sweeten
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox