From a4b770972b8f819e408d7cc3ae9637e15bff62f6 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Fri, 14 May 2010 00:19:28 -0700 Subject: drivers/net: Remove unnecessary returns from void function()s This patch removes from drivers/net/ all the unnecessary return; statements that precede the last closing brace of void functions. It does not remove the returns that are immediately preceded by a label as gcc doesn't like that. It also does not remove null void functions with return. Done via: $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \ xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }' with some cleanups by hand. Compile tested x86 allmodconfig only. Signed-off-by: Joe Perches Signed-off-by: David S. Miller --- drivers/net/stmmac/dwmac_lib.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'drivers/net/stmmac/dwmac_lib.c') diff --git a/drivers/net/stmmac/dwmac_lib.c b/drivers/net/stmmac/dwmac_lib.c index 0a504adb7eb3..a85415216ef4 100644 --- a/drivers/net/stmmac/dwmac_lib.c +++ b/drivers/net/stmmac/dwmac_lib.c @@ -52,7 +52,6 @@ void dwmac_dma_start_tx(unsigned long ioaddr) u32 value = readl(ioaddr + DMA_CONTROL); value |= DMA_CONTROL_ST; writel(value, ioaddr + DMA_CONTROL); - return; } void dwmac_dma_stop_tx(unsigned long ioaddr) @@ -60,7 +59,6 @@ void dwmac_dma_stop_tx(unsigned long ioaddr) u32 value = readl(ioaddr + DMA_CONTROL); value &= ~DMA_CONTROL_ST; writel(value, ioaddr + DMA_CONTROL); - return; } void dwmac_dma_start_rx(unsigned long ioaddr) @@ -68,8 +66,6 @@ void dwmac_dma_start_rx(unsigned long ioaddr) u32 value = readl(ioaddr + DMA_CONTROL); value |= DMA_CONTROL_SR; writel(value, ioaddr + DMA_CONTROL); - - return; } void dwmac_dma_stop_rx(unsigned long ioaddr) @@ -77,8 +73,6 @@ void dwmac_dma_stop_rx(unsigned long ioaddr) u32 value = readl(ioaddr + DMA_CONTROL); value &= ~DMA_CONTROL_SR; writel(value, ioaddr + DMA_CONTROL); - - return; } #ifdef DWMAC_DMA_DEBUG @@ -111,7 +105,6 @@ static void show_tx_process_state(unsigned int status) default: break; } - return; } static void show_rx_process_state(unsigned int status) @@ -149,7 +142,6 @@ static void show_rx_process_state(unsigned int status) default: break; } - return; } #endif @@ -244,8 +236,6 @@ void stmmac_set_mac_addr(unsigned long ioaddr, u8 addr[6], writel(data, ioaddr + high); data = (addr[3] << 24) | (addr[2] << 16) | (addr[1] << 8) | addr[0]; writel(data, ioaddr + low); - - return; } void stmmac_get_mac_addr(unsigned long ioaddr, unsigned char *addr, @@ -264,7 +254,5 @@ void stmmac_get_mac_addr(unsigned long ioaddr, unsigned char *addr, addr[3] = (lo_addr >> 24) & 0xff; addr[4] = hi_addr & 0xff; addr[5] = (hi_addr >> 8) & 0xff; - - return; } -- cgit v1.2.3-59-g8ed1b