[PATCH] alpha/boot: clean up formatting in bootp.c
From: Arjav Jain
Date: Thu Mar 05 2026 - 11:41:10 EST
Apply small formatting improvements to bootp.c:
- group and reorder include headers
- convert multi-line function signatures to single-line
- improve arithmetic operator spacing
- normalize pointer and cast spacing
- fix indentation inconsistencies
No functional changes intended.
Signed-off-by: Arjav Jain <arjavjain.jain1942@xxxxxxxxx>
---
arch/alpha/boot/bootp.c | 46 +++++++++++++++++------------------------
1 file changed, 19 insertions(+), 27 deletions(-)
diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c
index a6209b4fe18c..cdf979a02bcd 100644
--- a/arch/alpha/boot/bootp.c
+++ b/arch/alpha/boot/bootp.c
@@ -9,23 +9,21 @@
* based significantly on the arch/alpha/boot/main.c of Linus Torvalds
*/
#include <linux/kernel.h>
+#include <linux/mm.h>
#include <linux/slab.h>
+#include <linux/stdarg.h>
#include <linux/string.h>
#include <generated/utsrelease.h>
-#include <linux/mm.h>
#include <asm/console.h>
#include <asm/hwrpb.h>
#include <asm/io.h>
-#include <linux/stdarg.h>
-
#include "ksize.h"
extern unsigned long switch_to_osf_pal(unsigned long nr,
struct pcb_struct *pcb_va, struct pcb_struct *pcb_pa,
unsigned long *vptb);
-
extern void move_stack(unsigned long new_stack);
struct hwrpb_struct *hwrpb = INIT_HWRPB;
@@ -37,17 +35,16 @@ static struct pcb_struct pcb_va[1];
* This is easy using the virtual page table address.
*/
-static inline void *
-find_pa(unsigned long *vptb, void *ptr)
+static inline void *find_pa(unsigned long *vptb, void *ptr)
{
- unsigned long address = (unsigned long) ptr;
+ unsigned long address = (unsigned long)ptr;
unsigned long result;
result = vptb[address >> 13];
result >>= 32;
result <<= 13;
- result |= address & 0x1fff;
- return (void *) result;
+ result |= (address & 0x1fff);
+ return (void *)result;
}
/*
@@ -64,8 +61,7 @@ find_pa(unsigned long *vptb, void *ptr)
#define VPTB ((unsigned long *) 0x200000000)
#define L1 ((unsigned long *) 0x200802000)
-void
-pal_init(void)
+void pal_init(void)
{
unsigned long i, rev;
struct percpu_struct *percpu;
@@ -107,17 +103,15 @@ pal_init(void)
tbia(); /* do it directly in case we are SMP */
}
-static inline void
-load(unsigned long dst, unsigned long src, unsigned long count)
+static inline void load(unsigned long dst, unsigned long src, unsigned long count)
{
- memcpy((void *)dst, (void *)src, count);
+ memcpy((void *)dst, (const void *)src, count);
}
/*
* Start the kernel.
*/
-static inline void
-runkernel(void)
+static inline void runkernel(void)
{
__asm__ __volatile__(
"bis %0,%0,$27\n\t"
@@ -127,11 +121,9 @@ runkernel(void)
}
extern char _end;
-#define KERNEL_ORIGIN \
- ((((unsigned long)&_end) + 511) & ~511)
+#define KERNEL_ORIGIN ((((unsigned long)&_end) + 511) & ~511)
-void
-start_kernel(void)
+void start_kernel(void)
{
/*
* Note that this crufty stuff with static and envval
@@ -198,16 +190,16 @@ start_kernel(void)
* Sigh... */
#ifdef INITRD_IMAGE_SIZE
- load(initrd_start, KERNEL_ORIGIN+KERNEL_SIZE, 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);
+ 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;
+ ((long *)(ZERO_PGE + 256))[0] = initrd_start;
+ ((long *)(ZERO_PGE + 256))[1] = INITRD_IMAGE_SIZE;
#endif
runkernel();
--
2.53.0