linux-alpha.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] alpha: checkpatch whitespace errors in misc.c
@ 2014-07-15 19:18 Nicholas Krause
  2014-07-15 19:18 ` [PATCH 2/5] alpha: Fix spacing " Nicholas Krause
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Nicholas Krause @ 2014-07-15 19:18 UTC (permalink / raw)
  To: rth; +Cc: ink, mattst88, linux-alpha, linux-kernel

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(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 3ff9a95..3f86c3e 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -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 <nico@visuaide.com>  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.
-- 
1.9.1


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

* [PATCH 2/5] alpha: Fix spacing in misc.c
  2014-07-15 19:18 [PATCH 1/5] alpha: checkpatch whitespace errors in misc.c Nicholas Krause
@ 2014-07-15 19:18 ` Nicholas Krause
  2014-07-15 19:18 ` [PATCH 3/5] alpha: Remove whitespace errors that cleanfile missed Nicholas Krause
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Nicholas Krause @ 2014-07-15 19:18 UTC (permalink / raw)
  To: rth; +Cc: ink, mattst88, linux-alpha, linux-kernel

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(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 3f86c3e..119d500 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -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_printk
 extern 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
-- 
1.9.1

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

* [PATCH 3/5] alpha: Remove whitespace errors that cleanfile missed
  2014-07-15 19:18 [PATCH 1/5] alpha: checkpatch whitespace errors in misc.c Nicholas Krause
  2014-07-15 19:18 ` [PATCH 2/5] alpha: Fix spacing " Nicholas Krause
@ 2014-07-15 19:18 ` Nicholas Krause
  2014-07-15 19:18 ` [PATCH 4/5] alpha: Fix complex marco definitions Nicholas Krause
  2014-07-15 19:18 ` [PATCH 5/5] alpha: Fix while statement Nicholas Krause
  3 siblings, 0 replies; 5+ messages in thread
From: Nicholas Krause @ 2014-07-15 19:18 UTC (permalink / raw)
  To: rth; +Cc: ink, mattst88, linux-alpha, linux-kernel

This 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(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 119d500..174b7c6 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -144,7 +144,7 @@ static void error(char *x)
 	puts(x);
 	puts("\n\n -- System halted");
 
-	while (1);	
+	while (1);
 	/* Halt */
 }
 
-- 
1.9.1


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

* [PATCH 4/5] alpha: Fix complex marco definitions
  2014-07-15 19:18 [PATCH 1/5] alpha: checkpatch whitespace errors in misc.c Nicholas Krause
  2014-07-15 19:18 ` [PATCH 2/5] alpha: Fix spacing " Nicholas Krause
  2014-07-15 19:18 ` [PATCH 3/5] alpha: Remove whitespace errors that cleanfile missed Nicholas Krause
@ 2014-07-15 19:18 ` Nicholas Krause
  2014-07-15 19:18 ` [PATCH 5/5] alpha: Fix while statement Nicholas Krause
  3 siblings, 0 replies; 5+ messages in thread
From: Nicholas Krause @ 2014-07-15 19:18 UTC (permalink / raw)
  To: rth; +Cc: ink, mattst88, linux-alpha, linux-kernel

This 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(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 174b7c6..886e469 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -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_printk
 extern 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 ; }
-- 
1.9.1

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

* [PATCH 5/5] alpha: Fix while statement
  2014-07-15 19:18 [PATCH 1/5] alpha: checkpatch whitespace errors in misc.c Nicholas Krause
                   ` (2 preceding siblings ...)
  2014-07-15 19:18 ` [PATCH 4/5] alpha: Fix complex marco definitions Nicholas Krause
@ 2014-07-15 19:18 ` Nicholas Krause
  3 siblings, 0 replies; 5+ messages in thread
From: Nicholas Krause @ 2014-07-15 19:18 UTC (permalink / raw)
  To: rth; +Cc: ink, mattst88, linux-alpha, linux-kernel

This 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(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 886e469..56c3325 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -144,7 +144,7 @@ static void error(char *x)
 	puts(x);
 	puts("\n\n -- System halted");
 
-	while (1);
+	while{ (1); }
 	/* Halt */
 }
 
-- 
1.9.1

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

end of thread, other threads:[~2014-07-15 19:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15 19:18 [PATCH 1/5] alpha: checkpatch whitespace errors in misc.c Nicholas Krause
2014-07-15 19:18 ` [PATCH 2/5] alpha: Fix spacing " Nicholas Krause
2014-07-15 19:18 ` [PATCH 3/5] alpha: Remove whitespace errors that cleanfile missed Nicholas Krause
2014-07-15 19:18 ` [PATCH 4/5] alpha: Fix complex marco definitions Nicholas Krause
2014-07-15 19:18 ` [PATCH 5/5] alpha: Fix while statement Nicholas Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).