All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 28/42] arm: powerpc: Tidy up code style for cache functions
Date: Thu, 14 Nov 2019 12:57:36 -0700	[thread overview]
Message-ID: <20191114195751.30357-5-sjg@chromium.org> (raw)
In-Reply-To: <20191114195751.30357-1-sjg@chromium.org>

Remove the unwanted space before the bracket.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/lib/cache-cp15.c            | 12 ++++++------
 arch/microblaze/cpu/cache.c          | 18 +++++++++++-------
 board/armltd/integrator/integrator.c |  2 +-
 board/cobra5272/flash.c              | 12 ++++++------
 include/common.h                     |  2 +-
 post/lib_powerpc/cpu.c               |  6 +++---
 6 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index 47c223917a..8ca8e48380 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -253,17 +253,17 @@ static void cache_disable(uint32_t cache_bit)
 #endif
 
 #if CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
-void icache_enable (void)
+void icache_enable(void)
 {
 	return;
 }
 
-void icache_disable (void)
+void icache_disable(void)
 {
 	return;
 }
 
-int icache_status (void)
+int icache_status(void)
 {
 	return 0;					/* always off */
 }
@@ -285,17 +285,17 @@ int icache_status(void)
 #endif
 
 #if CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
-void dcache_enable (void)
+void dcache_enable(void)
 {
 	return;
 }
 
-void dcache_disable (void)
+void dcache_disable(void)
 {
 	return;
 }
 
-int dcache_status (void)
+int dcache_status(void)
 {
 	return 0;					/* always off */
 }
diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c
index eebeb37830..94114555ff 100644
--- a/arch/microblaze/cpu/cache.c
+++ b/arch/microblaze/cpu/cache.c
@@ -8,7 +8,7 @@
 #include <common.h>
 #include <asm/asm.h>
 
-int dcache_status (void)
+int dcache_status(void)
 {
 	int i = 0;
 	int mask = 0x80;
@@ -18,7 +18,7 @@ int dcache_status (void)
 	return i;
 }
 
-int icache_status (void)
+int icache_status(void)
 {
 	int i = 0;
 	int mask = 0x20;
@@ -28,28 +28,32 @@ int icache_status (void)
 	return i;
 }
 
-void	icache_enable (void) {
+void icache_enable(void)
+{
 	MSRSET(0x20);
 }
 
-void	icache_disable(void) {
+void icache_disable(void)
+{
 	/* we are not generate ICACHE size -> flush whole cache */
 	flush_cache(0, 32768);
 	MSRCLR(0x20);
 }
 
-void	dcache_enable (void) {
+void dcache_enable(void)
+{
 	MSRSET(0x80);
 }
 
-void	dcache_disable(void) {
+void dcache_disable(void)
+{
 #ifdef XILINX_USE_DCACHE
 	flush_cache(0, XILINX_DCACHE_BYTE_SIZE);
 #endif
 	MSRCLR(0x80);
 }
 
-void flush_cache (ulong addr, ulong size)
+void flush_cache(ulong addr, ulong size)
 {
 	int i;
 	for (i = 0; i < size; i += 4)
diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
index 0a2baa7297..f0fbe2b417 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -109,7 +109,7 @@ extern void cm_remap(void);
 	writel(SC_CTRL_FLASHVPP | SC_CTRL_FLASHWP, SC_CTRLS);
 #endif
 
-	icache_enable ();
+	icache_enable();
 
 	return 0;
 }
diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c
index e5edc2a040..9bf824889a 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -164,8 +164,8 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
 	 * chip is in programming mode.
 	 */
 
-	cflag = icache_status ();
-	icache_disable ();
+	cflag = icache_status();
+	icache_disable();
 	iflag = disable_interrupts ();
 
 	printf ("\n");
@@ -237,7 +237,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
 		enable_interrupts ();
 
 	if (cflag)
-		icache_enable ();
+		icache_enable();
 
 	return rc;
 }
@@ -267,8 +267,8 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
 	 * chip is in programming mode.
 	 */
 
-	cflag = icache_status ();
-	icache_disable ();
+	cflag = icache_status();
+	icache_disable();
 	iflag = disable_interrupts ();
 
 	MEM_FLASH_ADDR1 = CMD_UNLOCK1;
@@ -303,7 +303,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
 		enable_interrupts ();
 
 	if (cflag)
-		icache_enable ();
+		icache_enable();
 
 	return rc;
 }
diff --git a/include/common.h b/include/common.h
index 3f6a95d7e0..82b1abe698 100644
--- a/include/common.h
+++ b/include/common.h
@@ -189,7 +189,7 @@ int testdram(void);
 int	icache_status (void);
 void	icache_enable (void);
 void	icache_disable(void);
-int	dcache_status (void);
+int	dcache_status(void);
 void	dcache_enable (void);
 void	dcache_disable(void);
 void	mmu_disable(void);
diff --git a/post/lib_powerpc/cpu.c b/post/lib_powerpc/cpu.c
index 109be38e16..6713039330 100644
--- a/post/lib_powerpc/cpu.c
+++ b/post/lib_powerpc/cpu.c
@@ -57,12 +57,12 @@ ulong cpu_post_makecr (long v)
 
 int cpu_post_test (int flags)
 {
-	int ic = icache_status ();
+	int ic = icache_status();
 	int ret = 0;
 
 	WATCHDOG_RESET();
 	if (ic)
-		icache_disable ();
+		icache_disable();
 
 	if (ret == 0)
 		ret = cpu_post_test_cmp ();
@@ -110,7 +110,7 @@ int cpu_post_test (int flags)
 	WATCHDOG_RESET();
 
 	if (ic)
-		icache_enable ();
+		icache_enable();
 
 	WATCHDOG_RESET();
 
-- 
2.24.0.rc1.363.gb1bccd3e3d-goog

  parent reply	other threads:[~2019-11-14 19:57 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14 19:57 [U-Boot] [PATCH v4 00/42] common: Further reduce common.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 01/42] common: Move older CPU functions to their own header Simon Glass
2019-11-20  0:45   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 02/42] Drop CONFIG_SHOW_ACTIVITY Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 03/42] common: Drop global inclusion of status_led.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 04/42] status_led: Tidy up the code style Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 05/42] common: Move random-number functions into their own header Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 06/42] common: Drop linux/crc8.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 07/42] crc: Fix code style with crc functions Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 08/42] crc32: Use the crc.h header for " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 09/42] spl: bootcount: Move code out of header file Simon Glass
2019-11-20  0:46   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 10/42] common: Move bootcount functions to their " Simon Glass
2019-11-20  0:45   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 11/42] common: Move sorting functions to their own " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 12/42] Move strtomhz() to vsprintf.h Simon Glass
2019-11-20  0:45   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 13/42] common: Move env_get_ip() to net.h Simon Glass
2019-11-18 21:27   ` Joe Hershberger
2019-11-14 19:57 ` [U-Boot] [PATCH v4 14/42] serial: usb: Correct the usbtty_...() prototypes Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 15/42] common: Move serial_printf() to the serial header Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 16/42] common: Move serial functions out of common.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 17/42] common: Add a new lz4.h header file Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 18/42] common: Move some time functions out of common.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 19/42] common: Move wait_ticks " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 20/42] arm: pxa: Drop pxa_wait_ticks() Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 21/42] common: Move timer_get_us() function out of common.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 22/42] common: Move get_ticks() " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 23/42] common: Move mii_init() " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 24/42] common: Move some CPU functions " Simon Glass
2019-11-20  0:45   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 25/42] common: Drop cpu_init() Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 26/42] common: Move checkcpu() out of common.h Simon Glass
2019-11-20  0:46   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 27/42] common: Move some SMP functions " Simon Glass
2019-11-20  0:46   ` Tom Rini
2019-11-14 19:57 ` Simon Glass [this message]
2019-11-14 19:57 ` [U-Boot] [PATCH v4 29/42] common: Move some cache and MMU " Simon Glass
2019-11-20  0:46   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 30/42] common: Drop checkicache() and checkdcache() Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 31/42] common: Move ARM cache operations out of common.h Simon Glass
2019-11-15 12:46   ` Daniel Schwierzeck
2019-11-15 16:46     ` Simon Glass
2019-11-20  0:46   ` Tom Rini
2019-11-14 19:57 ` [U-Boot] [PATCH v4 32/42] arm: powerpc: Tidy up code style for interrupt functions Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 33/42] common: Move interrupt functions into a new header Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 34/42] common: Move enable/disable_interrupts out of common.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 35/42] common: Move command functions " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 36/42] common: Drop board_show_dram() Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 37/42] common: Move board_get_usable_ram_top() out of common.h Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 38/42] common: Move some board functions " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 39/42] common: Move pci_init_board() " Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 40/42] common: Move trap_init() " Simon Glass
2019-11-15 13:07   ` Daniel Schwierzeck
2019-11-14 19:57 ` [U-Boot] [PATCH v4 41/42] common: Drop get_endaddr() Simon Glass
2019-11-14 19:57 ` [U-Boot] [PATCH v4 42/42] common: Move old EEPROM functions into a new header Simon Glass
2019-11-21 22:23 ` [U-Boot] [PATCH v4 00/42] common: Further reduce common.h Simon Glass
2019-11-21 23:03   ` Tom Rini
2019-11-22  0:21     ` Simon Glass
2019-12-03  3:10 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191114195751.30357-5-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.