alpha: checkpatch gives errors and warnings in bootp.c
PATCH 1/5 alpha: checkpatch gives errors and warnings in bootp.c
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(-)
arch/alpha/boot/bootp.c +1 -1
@@ -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);
Signature · 1 line
1.9.1
PATCH 2/5 alpha: Checkpatch warnings on lines 71 and 72
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(-)
arch/alpha/boot/bootp.c +2 -2
@@ -68,8 +68,8 @@ voidpal_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 ;
Signature · 1 line
1.9.1
PATCH 3/5 alpha: Remove whitespace issues and turn spaces into tabs
In reply to Nicholas KrauseThis 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(-)
arch/alpha/boot/bootp.c +5 -5
@@ -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);
Signature · 1 line
1.9.1
PATCH 4/5 alpha: Fix if statment in bootp.c
In reply to Nicholas KrauseThis 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(-)
arch/alpha/boot/bootp.c +1 -2
@@ -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);
Signature · 1 line
1.9.1
PATCH 5/5 alpha: Cleanpatch Remove Errors
In reply to Nicholas KrauseThis 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(-)
arch/alpha/boot/bootp.c +2 -2
@@ -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 ;
Signature · 1 line
1.9.1