alpha: checkpatch whitespace errors in misc.c
PATCH 1/5 alpha: checkpatch whitespace errors in misc.c
This patch runs cleanfile against this file in order to remove all outstanding whitespace errors caught when I ran checkpatch on it.
--- arch/alpha/boot/misc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/alpha/boot/misc.c +3 -3
@@ -1,7 +1,7 @@/* * misc.c -* -* This is a collection of several routines from gzip-1.0.3 +* +* This is a collection of several routines from gzip-1.0.3 * adapted for Linux. * * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
@@ -10,7 +10,7 @@* * Nicolas Pitre <[email protected]> 1999/04/14 : * For this code to run directly from Flash, all constant variables must -* be marked with 'const' and all other variables initialized at run-time +* be marked with 'const' and all other variables initialized at run-time * only. This way all non constant variables will end up in the bss segment, * which should point to addresses in RAM and cleared to 0 on start. * This allows for a much quicker boot time.
Signature · 1 line
1.9.1
PATCH 2/5 alpha: Fix spacing in misc.c
Due to errors with checkpatch in this file I am checking certain defintions spacing to pass checkpatch for spacing issues.
--- arch/alpha/boot/misc.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
arch/alpha/boot/misc.c +12 -11
@@ -23,10 +23,10 @@#include <asm/uaccess.h> -#define memzero (s,n) memset ((s),0,(n)) +#define memzero (s, n) memset((s), 0 , (n))#define puts srm_printkextern long srm_printk (const char *, ...) - __attribute__ ((format (printf,1 ,2 ))); + __attribute__ ((format (printf,1 ,2 )));/* * gzip delarations
@@ -61,19 +61,19 @@ static unsigned outcnt; /* bytes in output buffer *//* Diagnostic functions */ #ifdef DEBUG -# define Assert (cond,msg) {if(!(cond)) error(msg);} +# define Assert (cond, msg) {if (!(cond)) error(msg) ; }# define Trace (x) fprintf x -# define Tracev (x) {if (verbose) fprintf x ;} -# define Tracevv (x) {if (verbose>1) fprintf x ;} -# define Tracec (c,x) {if (verbose && (c)) fprintf x ;} -# define Tracecv (c,x) {if (verbose>1 && (c)) fprintf x ;} +# define Tracev (x) {if (verbose) fprintf x ; } +# define Tracevv (x) {if (verbose > 1) fprintf x ; } +# define Tracec (c, x) {if (verbose && (c)) fprintf x ; } +# define Tracecv (c, x) {if (verbose > 1 && (c)) fprintf x ; }#else -# define Assert (cond,msg) +# define Assert (cond, msg)# define Trace (x)# define Tracev (x)# define Tracevv (x) -# define Tracec (c,x) -# define Tracecv (c,x) +# define Tracec (c, x) +# define Tracecv (c, x)#endif static int fill_inbuf (void );
@@ -144,7 +144,8 @@ static void error(char *x)puts (x);puts ("\n\n -- System halted" ); -while (1 );/* Halt */ +while (1 ); +/* Halt */ }unsigned int
Signature · 1 line
1.9.1
PATCH 3/5 alpha: Remove whitespace errors that cleanfile missed
In reply to Nicholas KrauseThis patch removes the whitespace error that cleanfile missed when I ran it on this file.
--- arch/alpha/boot/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/boot/misc.c +1 -1
@@ -144,7 +144,7 @@ static void error(char *x)puts (x);puts ("\n\n -- System halted" ); -while (1 ); +while (1 );/* Halt */ }
Signature · 1 line
1.9.1
PATCH 4/5 alpha: Fix complex marco definitions
In reply to Nicholas KrauseThis patch fixes all macro defintions that need parthesises as stated by checkpatch when run against this file.
--- arch/alpha/boot/misc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/alpha/boot/misc.c +3 -3
@@ -23,7 +23,7 @@#include <asm/uaccess.h> -#define memzero (s, n) memset((s), 0 , (n)) +#define memzero { (s, n) memset((s), 0 , (n)) }#define puts srm_printkextern long srm_printk (const char *, ...) __attribute__ ((format (printf,1 ,2 )));
@@ -61,8 +61,8 @@ static unsigned outcnt; /* bytes in output buffer *//* Diagnostic functions */ #ifdef DEBUG -# define Assert (cond, msg) {if (!(cond)) error(msg) ; } -# define Trace (x) fprintf x +# define Assert { (cond, msg) {if (!(cond)) error(msg) ; } } +# define Trace { (x) fprintf x }# define Tracev (x) {if (verbose) fprintf x ; }# define Tracevv (x) {if (verbose > 1) fprintf x ; }# define Tracec (c, x) {if (verbose && (c)) fprintf x ; }
Signature · 1 line
1.9.1
PATCH 5/5 alpha: Fix while statement
In reply to Nicholas KrauseThis fixes the if statement on line 147 of misc.c to have parthesises around itself removing a checkpatch error on this line.
--- arch/alpha/boot/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/boot/misc.c +1 -1
@@ -144,7 +144,7 @@ static void error(char *x)puts (x);puts ("\n\n -- System halted" ); -while (1 ); + while{ (1); }/* Halt */ }
Signature · 1 line
1.9.1