MIPS: AR7 whitespace hacking
PATCH 1/3 MIPS: AR7 whitespace hacking
MIPS: AR7 whitespace hacking
--- arch/mips/ar7/gpio.c | 6 +- arch/mips/ar7/memory.c | 3 +- arch/mips/ar7/platform.c | 587 ++++++++++++++++++++++++---------------------- arch/mips/ar7/prom.c | 49 ++-- arch/mips/ar7/setup.c | 15 +- 5 files changed, 343 insertions(+), 317 deletions(-)
arch/mips/ar7/gpio.c +3 -3
@@ -24,8 +24,8 @@#include <asm/mach-ar7/gpio.h> struct ar7_gpio_chip { -void __iomem *regs; -struct gpio_chip chip; +void __iomem *regs; +struct gpio_chip chip; };static int ar7_gpio_get_value (struct gpio_chip *chip,unsigned gpio)
@@ -77,7 +77,7 @@ static int ar7_gpio_direction_output(struct gpio_chip *chip,static struct ar7_gpio_chip ar7_gpio_chip = { .chip = { - .label ="ar7-gpio" , + .label ="ar7-gpio" , .direction_input = ar7_gpio_direction_input, .direction_output = ar7_gpio_direction_output, .set = ar7_gpio_set_value,
arch/mips/ar7/memory.c +1 -2
@@ -62,8 +62,7 @@ void __init prom_meminit(void)unsigned long pages; pages =memsize () >>PAGE_SHIFT ; -add_memory_region (PHYS_OFFSET , pages <<PAGE_SHIFT , -BOOT_MEM_RAM ); +add_memory_region (PHYS_OFFSET , pages <<PAGE_SHIFT ,BOOT_MEM_RAM ); }void __init prom_free_prom_memory (void )
arch/mips/ar7/platform.c +307 -280
770 lines not on this page · raw message
arch/mips/ar7/prom.c +25 -24
87 lines not on this page · raw message
arch/mips/ar7/setup.c +7 -8
@@ -26,8 +26,8 @@static void ar7_machine_restart (char *command) { -u32 *softres_reg =ioremap (AR7_REGS_RESET + -AR7_RESET_SOFTWARE ,1 ); +u32 *softres_reg =ioremap (AR7_REGS_RESET +AR7_RESET_SOFTWARE ,1 ); +writel (1 , softres_reg); }
@@ -41,6 +41,7 @@ static void ar7_machine_power_off(void) {u32 *power_reg = (u32 *)ioremap (AR7_REGS_POWER ,1 );u32 power_state =readl (power_reg) | (3 <<30 ); +writel (power_state, power_reg);ar7_machine_halt (); }
@@ -49,14 +50,14 @@ const char *get_system_type(void) {u16 chip_id =ar7_chip_id ();switch (chip_id) { -case AR7_CHIP_7300 : -return "TI AR7 (TNETD7300)" ;case AR7_CHIP_7100 :return "TI AR7 (TNETD7100)" ;case AR7_CHIP_7200 :return "TI AR7 (TNETD7200)" ; +case AR7_CHIP_7300 : +return "TI AR7 (TNETD7300)" ;default : -return "TI AR7 (Unknown)" ; +return "TI AR7 (unknown)" ; } }
@@ -70,7 +71,6 @@ console_initcall(ar7_init_console);* Initializes basic routines and structures pointers, memory size (as * given by the bios and saves the command line. */ -void __init plat_mem_setup (void ) {unsigned long io_base;
@@ -88,6 +88,5 @@ void __init plat_mem_setup(void)prom_meminit ();printk (KERN_INFO "%s, ID: 0x%04x, Revision: 0x%02x\n" , -get_system_type (), -ar7_chip_id (),ar7_chip_rev ()); +get_system_type (),ar7_chip_id (),ar7_chip_rev ()); }
Signature · 1 line
1.6.6
Quoted 3 lines · Alexander Clouter
MIPS: AR7 whitespace hacking
Signed-off-by Alexander Clouter <[email protected]>
[...]
arch/mips/ar7/platform.c line 47
Quoted 12 lines
void
__initprom_free_prom_memory(void)arch/mips/ar7/platform.c +3
-0@@ -42,39 +42,42 @@#include <asm/mach-ar7/gpio.h> #include <asm/mach-ar7/prom.h> +/***************************************************************************** +* VLYNQ Bus +****************************************************************************/
Why not simply use:
/* VLYNQ Bus */
You have deleted lots of whitespaces, but added more *.
[...]
Quoted 3 lines
arch/mips/ar7/platform.c +3
-0+/***************************************************************************** +* Flash +****************************************************************************/
[...]
Quoted 4 lines
arch/mips/ar7/platform.c +4
-0+ +/***************************************************************************** +* Ethernet +****************************************************************************/
[...]
Quoted 5 lines
arch/mips/ar7/platform.c +5
-0+ +/***************************************************************************** +* USB +****************************************************************************/ +
[...]
Quoted 4 lines
+/*****************************************************************************
+ * LEDs
+ ****************************************************************************/
[...]
Quoted 3 lines
+/*****************************************************************************
+ * Watchdog
+ ****************************************************************************/
[...]
Quoted 4 lines
arch/mips/ar7/platform.c +4
-0+ +/***************************************************************************** +* Init +****************************************************************************/
[...]
Quoted 10 lines
arch/mips/ar7/platform.c +0
-1@@ -70,7 +71,6 @@ console_initcall(ar7_init_console);* Initializes basic routines and structures pointers, memory size (as * given by the bios and saves the command line. */ -void __init plat_mem_setup (void ) {unsigned long io_base;
arch/mips/ar7/platform.c void __init plat_mem_setup(void) · line 92
Quoted 7 lines
arch/mips/ar7/platform.c +1
-2@@ -88,6 +88,5 @@ void __init plat_mem_setup(void)prom_meminit ();printk (KERN_INFO "%s, ID: 0x%04x, Revision: 0x%02x\n" , -get_system_type (), -ar7_chip_id (),ar7_chip_rev ()); +get_system_type (),ar7_chip_id (),ar7_chip_rev ()); }
Perhaps you can use pr_info() instead of printk(KERN_INFO) too, of course, if there are more printk(KERN_...), you can replace them by pr_xxx defined in include/linux/kernel.h
Best Regards,
Wu Zhangjin
Quoted 11 lines · Wu Zhangjin
Quoted 4 lines
+/*****************************************************************************
+ * VLYNQ Bus
+ ****************************************************************************/Why not simply use:
/* VLYNQ Bus */
You have deleted lots of whitespaces, but added more *.
"good enough for ARM[1]" :)
Compromise on this instead?
----
/*
* VLYNQ Bus
*/
----
Quoted 11 lines
Quoted 11 lines
arch/mips/ar7/setup.c +0
-1@@ -70,7 +71,6 @@ console_initcall(ar7_init_console);* Initializes basic routines and structures pointers, memory size (as * given by the bios and saves the command line. */ -void __init plat_mem_setup (void ) {unsigned long io_base;@@ -88,6 +88,5 @@ void __init plat_mem_setup(void)prom_meminit ();
Quoted 10 lines
arch/mips/ar7/setup.c void __init plat_mem_setup(void) · line 92
Quoted 5 lines
arch/mips/ar7/setup.c +1
-2printk (KERN_INFO "%s, ID: 0x%04x, Revision: 0x%02x\n" , -get_system_type (), -ar7_chip_id (),ar7_chip_rev ()); +get_system_type (),ar7_chip_id (),ar7_chip_rev ()); }Perhaps you can use
pr_info()instead ofprintk(KERN_INFO)too, of course, if there are moreprintk(KERN_...), you can replace them bypr_xxxdefined ininclude/linux/kernel.h
I'm not responsible for that printk()...although the others I will admit to :)
I'll roll out a replacement later today hopefully.
Cheers
Signature · 3 lines
Alexander Clouter
.sigmonster says: Vini, vidi, Linux!
-- Unknown sourceQuoted 17 lines · Alexander Clouter
From: Alexander Clouter <[email protected]>
Date: Mon, 1 Feb 2010 10:03:45 +0000
To: [email protected]
Subject: Re: [PATCH 1/3] MIPS: AR7 whitespace hackingQuoted 11 lines · Wu Zhangjin
Quoted 4 lines
+/*****************************************************************************
+ * VLYNQ Bus
+ ****************************************************************************/Why not simply use:
/* VLYNQ Bus */
You have deleted lots of whitespaces, but added more *.
Quoted 8 lines
"good enough for ARM[1]" :)
Compromise on this instead?
----
/*
* VLYNQ Bus
*/
----
Just did this one myself.
The patch also had a reject on the lest segment of arch/mips/ar7/prom.c.rej; it seems that you've not created your patches against a recent version of the -queue tree. Either way, queued for 2.6.34.
Ralf