Pb1100 code style cleanup
PATCH 5/11 Pb1100 code style cleanup
Fix several errors and warnings given by checkpatch.pl:
- space between asterisk and variable name;
- use of C99 // comments;
- using simple_strtol() where strict_strtol() could be used.
In addition to these changes, also do the following:
- properly indent the code;
- remove space after the type cast's closing parenthesis;
- replace numeric literals/expressions with the matching macros;
- replace spaces after the macro name with tabs in the #define directives, and sometimes insert spaces there;
- fix typos/errors, capitalize acronyms, etc. in the comments;
- make the multi-line comment style consistent with the kernel style elsewhere by adding empty first line;
- update MontaVista copyright;
- remove Pete Popov's old email address...
arch/mips/au1000/pb1100/Makefile | 6 - arch/mips/au1000/pb1100/board_setup.c | 50 ++++++++-------- arch/mips/au1000/pb1100/init.c | 11 +-- arch/mips/au1000/pb1100/irqmap.c | 10 +-- include/asm-mips/mach-pb1x00/pb1100.h | 104 +++++++++++++++++----------------- 5 files changed, 91 insertions(+), 90 deletions(-)
arch/mips/au1000/pb1100/Makefile +3 -3
@@ -1,8 +1,8 @@ # -# Copyright 2000,2001 MontaVista Software Inc. -# Author: MontaVista Software, Inc. -# [email protected] or [email protected] +# Copyright 2000, 2001, 2008 MontaVista Software Inc. +# Author: MontaVista Software, Inc. <[email protected]> # # Makefile for the Alchemy Semiconductor Pb1100 board. +# lib-y := init.o board_setup.o irqmap.o
arch/mips/au1000/pb1100/board_setup.c +26 -24
104 lines not on this page · raw message
arch/mips/au1000/pb1100/init.c +5 -6
@@ -3,9 +3,8 @@* BRIEF MODULE DESCRIPTION * Pb1100 board setup * -* Copyright 2002 MontaVista Software Inc. -* Author: MontaVista Software, Inc. -* [email protected] or [email protected] +* Copyright 2002, 2008 MontaVista Software Inc. +* Author: MontaVista Software, Inc. <[email protected]> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the
@@ -46,8 +45,8 @@ void __init prom_init(void)unsigned long memsize; prom_argc = fw_arg0; - prom_argv = (char **) fw_arg1; - prom_envp = (char **) fw_arg3; + prom_argv = (char **)fw_arg1; + prom_envp = (char **)fw_arg3;prom_init_cmdline ();
@@ -55,7 +54,7 @@ void __init prom_init(void)if (!memsize_str) memsize =0x04000000 ;else - memsize =simple_strtol (memsize_str,NULL ,0 ); + memsize =strict_strtol (memsize_str,0 ,NULL );add_memory_region (0 , memsize,BOOT_MEM_RAM ); }
arch/mips/au1000/pb1100/irqmap.c +5 -5
@@ -1,6 +1,6 @@/* * BRIEF MODULE DESCRIPTION -* Au1xxx irq map table +* Au1xx0 IRQ map table * * Copyright 2003 Embedded Edge, LLC * [email protected]
@@ -31,10 +31,10 @@#include <asm/mach-au1x00/au1000.h> struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { - {AU1000_GPIO_9 ,INTC_INT_LOW_LEVEL ,0 },// PCMCIA Card Fully_Interted# - {AU1000_GPIO_10 ,INTC_INT_LOW_LEVEL ,0 },// PCMCIA Card STSCHG# - {AU1000_GPIO_11 ,INTC_INT_LOW_LEVEL ,0 },// PCMCIA Card IRQ# - {AU1000_GPIO_13 ,INTC_INT_LOW_LEVEL ,0 },// DC_IRQ# + {AU1000_GPIO_9 ,INTC_INT_LOW_LEVEL ,0 },/* PCMCIA Card Fully_Inserted# */ + {AU1000_GPIO_10 ,INTC_INT_LOW_LEVEL ,0 },/* PCMCIA Card STSCHG# */ + {AU1000_GPIO_11 ,INTC_INT_LOW_LEVEL ,0 },/* PCMCIA Card IRQ# */ + {AU1000_GPIO_13 ,INTC_INT_LOW_LEVEL ,0 },/* DC_IRQ# */ };int __initdata au1xxx_nr_irqs =ARRAY_SIZE (au1xxx_irq_map);
include/asm-mips/mach-pb1x00/pb1100.h +52 -52
120 lines not on this page · raw message
Ralf Baechle
AppliedApplied. Thanks,
Ralf