[U-Boot] [PATCH 31/41] arm: powerpc: Tidy up code style for interrupt functions

Simon Glass sjg at chromium.org
Mon Sep 30 14:41:02 UTC 2019


Remove the unwanted space before the bracket.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/arm/cpu/arm11/cpu.c              |  2 +-
 arch/arm/cpu/arm920t/cpu.c            |  2 +-
 arch/arm/cpu/arm926ejs/cpu.c          |  2 +-
 arch/arm/cpu/arm946es/cpu.c           |  2 +-
 arch/arm/cpu/sa1100/cpu.c             |  2 +-
 arch/arm/lib/interrupts.c             |  6 +++---
 arch/m68k/lib/interrupts.c            |  8 ++++----
 arch/nios2/cpu/interrupts.c           | 14 +++++++-------
 arch/powerpc/cpu/mpc83xx/cpu.c        |  2 +-
 arch/powerpc/cpu/mpc83xx/interrupts.c |  6 +++---
 arch/powerpc/cpu/mpc86xx/interrupts.c |  2 +-
 arch/powerpc/lib/interrupts.c         |  8 ++++----
 arch/sh/cpu/sh4/interrupts.c          |  6 +++---
 board/cobra5272/flash.c               |  8 ++++----
 14 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c
index a546ec21de4..280622fe33a 100644
--- a/arch/arm/cpu/arm11/cpu.c
+++ b/arch/arm/cpu/arm11/cpu.c
@@ -30,7 +30,7 @@ int cleanup_before_linux (void)
 	 * we turn off caches etc ...
 	 */
 
-	disable_interrupts ();
+	disable_interrupts();
 
 	/* turn off I/D-cache */
 	icache_disable();
diff --git a/arch/arm/cpu/arm920t/cpu.c b/arch/arm/cpu/arm920t/cpu.c
index a98c86eaf3f..e632aa52f8c 100644
--- a/arch/arm/cpu/arm920t/cpu.c
+++ b/arch/arm/cpu/arm920t/cpu.c
@@ -28,7 +28,7 @@ int cleanup_before_linux (void)
 	 * we turn off caches etc ...
 	 */
 
-	disable_interrupts ();
+	disable_interrupts();
 
 	/* turn off I/D-cache */
 	icache_disable();
diff --git a/arch/arm/cpu/arm926ejs/cpu.c b/arch/arm/cpu/arm926ejs/cpu.c
index 6d06fb758ab..f4b27d93be6 100644
--- a/arch/arm/cpu/arm926ejs/cpu.c
+++ b/arch/arm/cpu/arm926ejs/cpu.c
@@ -28,7 +28,7 @@ int cleanup_before_linux (void)
 	 * we turn off caches etc ...
 	 */
 
-	disable_interrupts ();
+	disable_interrupts();
 
 
 	/* turn off I/D-cache */
diff --git a/arch/arm/cpu/arm946es/cpu.c b/arch/arm/cpu/arm946es/cpu.c
index 0a78ffbae1a..19b805096f4 100644
--- a/arch/arm/cpu/arm946es/cpu.c
+++ b/arch/arm/cpu/arm946es/cpu.c
@@ -29,7 +29,7 @@ int cleanup_before_linux (void)
 	 * we turn off caches etc ...
 	 */
 
-	disable_interrupts ();
+	disable_interrupts();
 
 	/* ARM926E-S needs the protection unit enabled for the icache to have
 	 * been enabled	 - left for possible later use
diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c
index 8ef9f294f23..ec408564c1e 100644
--- a/arch/arm/cpu/sa1100/cpu.c
+++ b/arch/arm/cpu/sa1100/cpu.c
@@ -30,7 +30,7 @@ int cleanup_before_linux (void)
 	 * just disable everything that can disturb booting linux
 	 */
 
-	disable_interrupts ();
+	disable_interrupts();
 
 	/* turn off I-cache */
 	icache_disable();
diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c
index ee775ce5d26..e78ca56d253 100644
--- a/arch/arm/lib/interrupts.c
+++ b/arch/arm/lib/interrupts.c
@@ -25,7 +25,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int interrupt_init (void)
+int interrupt_init(void)
 {
 	/*
 	 * setup up stacks if necessary
@@ -35,11 +35,11 @@ int interrupt_init (void)
 	return 0;
 }
 
-void enable_interrupts (void)
+void enable_interrupts(void)
 {
 	return;
 }
-int disable_interrupts (void)
+int disable_interrupts(void)
 {
 	return 0;
 }
diff --git a/arch/m68k/lib/interrupts.c b/arch/m68k/lib/interrupts.c
index 2d1c6136a11..85ae3b4ee07 100644
--- a/arch/m68k/lib/interrupts.c
+++ b/arch/m68k/lib/interrupts.c
@@ -42,7 +42,7 @@ static __inline__ void set_sr (unsigned short sr)
 /*
  * Install and free an interrupt handler
  */
-void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg)
+void irq_install_handler(int vec, interrupt_handler_t * handler, void *arg)
 {
 	if ((vec < 0) || (vec >= NR_IRQS)) {
 		printf ("irq_install_handler: wrong interrupt vector %d\n",
@@ -54,7 +54,7 @@ void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg)
 	irq_vecs[vec].arg = arg;
 }
 
-void irq_free_handler (int vec)
+void irq_free_handler(int vec)
 {
 	if ((vec < 0) || (vec >= NR_IRQS)) {
 		return;
@@ -64,7 +64,7 @@ void irq_free_handler (int vec)
 	irq_vecs[vec].arg = NULL;
 }
 
-void enable_interrupts (void)
+void enable_interrupts(void)
 {
 	unsigned short sr;
 
@@ -72,7 +72,7 @@ void enable_interrupts (void)
 	set_sr (sr & ~0x0700);
 }
 
-int disable_interrupts (void)
+int disable_interrupts(void)
 {
 	unsigned short sr;
 
diff --git a/arch/nios2/cpu/interrupts.c b/arch/nios2/cpu/interrupts.c
index 6b5d0724e34..96c30209353 100644
--- a/arch/nios2/cpu/interrupts.c
+++ b/arch/nios2/cpu/interrupts.c
@@ -23,7 +23,7 @@ struct	irq_action {
 
 static struct irq_action vecs[32];
 
-int disable_interrupts (void)
+int disable_interrupts(void)
 {
 	int val = rdctl (CTL_STATUS);
 	wrctl (CTL_STATUS, val & ~STATUS_IE);
@@ -36,7 +36,7 @@ void enable_interrupts( void )
 	wrctl (CTL_STATUS, val | STATUS_IE);
 }
 
-void external_interrupt (struct pt_regs *regs)
+void external_interrupt(struct pt_regs *regs)
 {
 	unsigned irqs;
 	struct irq_action *act;
@@ -73,7 +73,7 @@ static void def_hdlr (void *arg)
 }
 
 /*************************************************************************/
-void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg)
+void irq_install_handler(int irq, interrupt_handler_t *hdlr, void *arg)
 {
 
 	int flag;
@@ -84,7 +84,7 @@ void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg)
 		return;
 	act = &vecs[irq];
 
-	flag = disable_interrupts ();
+	flag = disable_interrupts();
 	if (hdlr) {
 		act->handler = hdlr;
 		act->arg = arg;
@@ -95,11 +95,11 @@ void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg)
 		ena &= ~(1 << irq);		/* disable */
 	}
 	wrctl (CTL_IENABLE, ena);
-	if (flag) enable_interrupts ();
+	if (flag) enable_interrupts();
 }
 
 
-int interrupt_init (void)
+int interrupt_init(void)
 {
 	int i;
 
@@ -110,7 +110,7 @@ int interrupt_init (void)
 		vecs[i].count = 0;
 	}
 
-	enable_interrupts ();
+	enable_interrupts();
 	return (0);
 }
 
diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index 1c0d0d26320..71e4bb3f287 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -196,7 +196,7 @@ void watchdog_reset (void)
 	immr->wdt.swsrr = 0xaa39;
 
 	if (re_enable)
-		enable_interrupts ();
+		enable_interrupts();
 }
 #endif
 
diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c
index 520c2c363e3..04cd1473214 100644
--- a/arch/powerpc/cpu/mpc83xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc83xx/interrupts.c
@@ -35,7 +35,7 @@ void interrupt_init_cpu (unsigned *decrementer_count)
  * Handle external interrupts
  */
 
-void external_interrupt (struct pt_regs *regs)
+void external_interrupt(struct pt_regs *regs)
 {
 }
 
@@ -45,12 +45,12 @@ void external_interrupt (struct pt_regs *regs)
  */
 
 void
-irq_install_handler (int irq, interrupt_handler_t * handler, void *arg)
+irq_install_handler(int irq, interrupt_handler_t * handler, void *arg)
 {
 }
 
 
-void irq_free_handler (int irq)
+void irq_free_handler(int irq)
 {
 }
 
diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c
index ed780a599d1..04c8f25af60 100644
--- a/arch/powerpc/cpu/mpc86xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc86xx/interrupts.c
@@ -108,5 +108,5 @@ int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  */
 void external_interrupt(struct pt_regs *regs)
 {
-	puts("external_interrupt (oops!)\n");
+	puts("external_interrupt(oops!)\n");
 }
diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c
index 4b7f543a180..a58ddfa569c 100644
--- a/arch/powerpc/lib/interrupts.c
+++ b/arch/powerpc/lib/interrupts.c
@@ -38,13 +38,13 @@ static __inline__ void set_dec (unsigned long val)
 }
 #endif /* !CONFIG_MPC83XX_TIMER */
 
-void enable_interrupts (void)
+void enable_interrupts(void)
 {
 	set_msr (get_msr () | MSR_EE);
 }
 
 /* returns flag if MSR_EE was set before */
-int disable_interrupts (void)
+int disable_interrupts(void)
 {
 	ulong msr = get_msr ();
 
@@ -53,7 +53,7 @@ int disable_interrupts (void)
 }
 
 #ifndef CONFIG_MPC83XX_TIMER
-int interrupt_init (void)
+int interrupt_init(void)
 {
 	/* call cpu specific function from $(CPU)/interrupts.c */
 	interrupt_init_cpu (&decrementer_count);
@@ -67,7 +67,7 @@ int interrupt_init (void)
 
 static volatile ulong timestamp = 0;
 
-void timer_interrupt (struct pt_regs *regs)
+void timer_interrupt(struct pt_regs *regs)
 {
 	/* call cpu specific function from $(CPU)/interrupts.c */
 	timer_interrupt_cpu (regs);
diff --git a/arch/sh/cpu/sh4/interrupts.c b/arch/sh/cpu/sh4/interrupts.c
index ff7470ecccb..5982aad54eb 100644
--- a/arch/sh/cpu/sh4/interrupts.c
+++ b/arch/sh/cpu/sh4/interrupts.c
@@ -6,16 +6,16 @@
 
 #include <common.h>
 
-int interrupt_init (void)
+int interrupt_init(void)
 {
 	return 0;
 }
 
-void enable_interrupts (void)
+void enable_interrupts(void)
 {
 
 }
 
-int disable_interrupts (void){
+int disable_interrupts(void){
 	return 0;
 }
diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c
index 0e1d9ce8d35..ccff46adf8b 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -167,7 +167,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
 
 	cflag = icache_status();
 	icache_disable();
-	iflag = disable_interrupts ();
+	iflag = disable_interrupts();
 
 	printf ("\n");
 
@@ -235,7 +235,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
 	udelay (10000);
 
 	if (iflag)
-		enable_interrupts ();
+		enable_interrupts();
 
 	if (cflag)
 		icache_enable();
@@ -270,7 +270,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
 
 	cflag = icache_status();
 	icache_disable();
-	iflag = disable_interrupts ();
+	iflag = disable_interrupts();
 
 	MEM_FLASH_ADDR1 = CMD_UNLOCK1;
 	MEM_FLASH_ADDR2 = CMD_UNLOCK2;
@@ -301,7 +301,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
 		rc = ERR_PROG_ERROR;
 
 	if (iflag)
-		enable_interrupts ();
+		enable_interrupts();
 
 	if (cflag)
 		icache_enable();
-- 
2.23.0.444.g18eeb5a265-goog



More information about the U-Boot mailing list