linux-alpha.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] alpha: checkpatch  gives errors and warnings in bootp.c
@ 2014-07-15  3:46 Nicholas Krause
  2014-07-15  3:46 ` [PATCH 2/5] alpha: Checkpatch warnings on lines 71 and 72 Nicholas Krause
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Nicholas Krause @ 2014-07-15  3:46 UTC (permalink / raw)
  To: rth; +Cc: ink, mattst88, linux-alpha, linux-kernel

When running checkpatch on this file I get lots of warnings and even a few
errors. This patch cleans up the coding style warning I get on line 26.
---
 arch/alpha/boot/bootp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c
index 2a542a5..8eb821e 100644
--- a/arch/alpha/boot/bootp.c
+++ b/arch/alpha/boot/bootp.c
@@ -23,7 +23,7 @@
 #include "ksize.h"
 
 extern unsigned long switch_to_osf_pal(unsigned long nr,
-	struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa,
+	struct pcb_struct *pcb_va, struct pcb_struct *pcb_pa,
 	unsigned long *vptb);
 
 extern void move_stack(unsigned long new_stack);
-- 
1.9.1

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

* [PATCH 2/5] alpha: Checkpatch warnings on lines 71 and 72
  2014-07-15  3:46 [PATCH 1/5] alpha: checkpatch gives errors and warnings in bootp.c Nicholas Krause
@ 2014-07-15  3:46 ` Nicholas Krause
  2014-07-15  3:46 ` [PATCH 3/5] alpha: Remove whitespace issues and turn spaces into tabs Nicholas Krause
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Nicholas Krause @ 2014-07-15  3:46 UTC (permalink / raw)
  To: rth; +Cc: ink, mattst88, linux-alpha, linux-kernel

In bootp.c I am hitting lots of warnings this fixes two on lines 71,72
in order to pass checkpatch and follow kernel coding style.
---
 arch/alpha/boot/bootp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c
index 8eb821e..3ee529d 100644
--- a/arch/alpha/boot/bootp.c
+++ b/arch/alpha/boot/bootp.c
@@ -68,8 +68,8 @@ void
 pal_init(void)
 {
 	unsigned long i, rev;
-	struct percpu_struct * percpu;
-	struct pcb_struct * pcb_pa;
+	struct percpu_struct *percpu;
+	struct pcb_struct *pcb_pa;
 
 	/* Create the dummy PCB.  */
 	pcb_va->ksp = 0;
-- 
1.9.1


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

* [PATCH 3/5] alpha: Remove whitespace issues and turn spaces into tabs
  2014-07-15  3:46 [PATCH 1/5] alpha: checkpatch gives errors and warnings in bootp.c Nicholas Krause
  2014-07-15  3:46 ` [PATCH 2/5] alpha: Checkpatch warnings on lines 71 and 72 Nicholas Krause
@ 2014-07-15  3:46 ` Nicholas Krause
  2014-07-15  3:46 ` [PATCH 4/5] alpha: Fix if statment in bootp.c Nicholas Krause
  2014-07-15  3:46 ` [PATCH 5/5] alpha: Cleanpatch Remove Errors Nicholas Krause
  3 siblings, 0 replies; 5+ messages in thread
From: Nicholas Krause @ 2014-07-15  3:46 UTC (permalink / raw)
  To: rth; +Cc: ink, mattst88, linux-alpha, linux-kernel

This patch removes all the whitespace an tab issues that this file
has when running checkpatch
---
 arch/alpha/boot/bootp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c
index 3ee529d..6227e4f 100644
--- a/arch/alpha/boot/bootp.c
+++ b/arch/alpha/boot/bootp.c
@@ -48,7 +48,7 @@ find_pa(unsigned long *vptb, void *ptr)
 	result <<= 13;
 	result |= address & 0x1fff;
 	return (void *) result;
-}	
+}
 
 /*
  * This function moves into OSF/1 pal-code, and has a temporary
@@ -152,7 +152,7 @@ start_kernel(void)
 	srm_printk("Linux/AXP bootp loader for Linux " UTS_RELEASE "\n");
 	if (INIT_HWRPB->pagesize != 8192) {
 		srm_printk("Expected 8kB pages, got %ldkB\n",
-		           INIT_HWRPB->pagesize >> 10);
+	INIT_HWRPB->pagesize >> 10);
 		return;
 	}
 	if (INIT_HWRPB->vptb != (unsigned long) VPTB) {
@@ -162,7 +162,7 @@ start_kernel(void)
 	}
 	pal_init();
 
-	/* The initrd must be page-aligned.  See below for the 
+	/* The initrd must be page-aligned.  See below for the
 	   cause of the magic number 5.  */
 	initrd_start = ((START_ADDR + 5*KERNEL_SIZE + PAGE_SIZE) |
 			(PAGE_SIZE-1)) + 1;
@@ -200,8 +200,8 @@ start_kernel(void)
 #ifdef INITRD_IMAGE_SIZE
 	load(initrd_start, KERNEL_ORIGIN+KERNEL_SIZE, INITRD_IMAGE_SIZE);
 #endif
-        load(START_ADDR+(4*KERNEL_SIZE), KERNEL_ORIGIN, KERNEL_SIZE);
-        load(START_ADDR, START_ADDR+(4*KERNEL_SIZE), KERNEL_SIZE);
+	load(START_ADDR+(4*KERNEL_SIZE), KERNEL_ORIGIN, KERNEL_SIZE);
+	load(START_ADDR, START_ADDR+(4*KERNEL_SIZE), KERNEL_SIZE);
 
 	memset((char*)ZERO_PGE, 0, PAGE_SIZE);
 	strcpy((char*)ZERO_PGE, envval);
-- 
1.9.1


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

* [PATCH 4/5] alpha: Fix if statment in bootp.c
  2014-07-15  3:46 [PATCH 1/5] alpha: checkpatch gives errors and warnings in bootp.c Nicholas Krause
  2014-07-15  3:46 ` [PATCH 2/5] alpha: Checkpatch warnings on lines 71 and 72 Nicholas Krause
  2014-07-15  3:46 ` [PATCH 3/5] alpha: Remove whitespace issues and turn spaces into tabs Nicholas Krause
@ 2014-07-15  3:46 ` Nicholas Krause
  2014-07-15  3:46 ` [PATCH 5/5] alpha: Cleanpatch Remove Errors Nicholas Krause
  3 siblings, 0 replies; 5+ messages in thread
From: Nicholas Krause @ 2014-07-15  3:46 UTC (permalink / raw)
  To: rth; +Cc: ink, mattst88, linux-alpha, linux-kernel

This patch fixes the if statement on line 180 to be changed to having
no brackets as defined by kernel coding style for one line if statements.
---
 arch/alpha/boot/bootp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c
index 6227e4f..47e33cb 100644
--- a/arch/alpha/boot/bootp.c
+++ b/arch/alpha/boot/bootp.c
@@ -177,9 +177,8 @@ start_kernel(void)
 	move_stack(initrd_start - PAGE_SIZE);
 
 	nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval));
-	if (nbytes < 0 || nbytes >= sizeof(envval)) {
+	if (nbytes < 0 || nbytes >= sizeof(envval))
 		nbytes = 0;
-	}
 	envval[nbytes] = '\0';
 	srm_printk("Loading the kernel...'%s'\n", envval);
 
-- 
1.9.1

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

* [PATCH 5/5] alpha: Cleanpatch Remove Errors
  2014-07-15  3:46 [PATCH 1/5] alpha: checkpatch gives errors and warnings in bootp.c Nicholas Krause
                   ` (2 preceding siblings ...)
  2014-07-15  3:46 ` [PATCH 4/5] alpha: Fix if statment in bootp.c Nicholas Krause
@ 2014-07-15  3:46 ` Nicholas Krause
  3 siblings, 0 replies; 5+ messages in thread
From: Nicholas Krause @ 2014-07-15  3:46 UTC (permalink / raw)
  To: rth; +Cc: ink, mattst88, linux-alpha, linux-kernel

This patch removes errors on lines 205,206 to fit kernel coding
style.
---
 arch/alpha/boot/bootp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c
index 47e33cb..ac0351d 100644
--- a/arch/alpha/boot/bootp.c
+++ b/arch/alpha/boot/bootp.c
@@ -202,8 +202,8 @@ start_kernel(void)
 	load(START_ADDR+(4*KERNEL_SIZE), KERNEL_ORIGIN, KERNEL_SIZE);
 	load(START_ADDR, START_ADDR+(4*KERNEL_SIZE), KERNEL_SIZE);
 
-	memset((char*)ZERO_PGE, 0, PAGE_SIZE);
-	strcpy((char*)ZERO_PGE, envval);
+	memset((char *)ZERO_PGE, 0, PAGE_SIZE);
+	strcpy((char *)ZERO_PGE, envval);
 #ifdef INITRD_IMAGE_SIZE
 	((long *)(ZERO_PGE+256))[0] = initrd_start;
 	((long *)(ZERO_PGE+256))[1] = INITRD_IMAGE_SIZE;
-- 
1.9.1


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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15  3:46 [PATCH 1/5] alpha: checkpatch gives errors and warnings in bootp.c Nicholas Krause
2014-07-15  3:46 ` [PATCH 2/5] alpha: Checkpatch warnings on lines 71 and 72 Nicholas Krause
2014-07-15  3:46 ` [PATCH 3/5] alpha: Remove whitespace issues and turn spaces into tabs Nicholas Krause
2014-07-15  3:46 ` [PATCH 4/5] alpha: Fix if statment in bootp.c Nicholas Krause
2014-07-15  3:46 ` [PATCH 5/5] alpha: Cleanpatch Remove Errors 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).