Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4b77097 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller
Browse files

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 21ce849b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -726,7 +726,6 @@ static void el_receive(struct net_device *dev)
		dev->stats.rx_packets++;
		dev->stats.rx_bytes += pkt_len;
	}
	return;
}

/**
+0 −2
Original line number Diff line number Diff line
@@ -573,7 +573,6 @@ el2_block_output(struct net_device *dev, int count,
    }
    blocked:;
    outb_p(ei_status.interface_num==0 ? ECNTRL_THIN : ECNTRL_AUI, E33G_CNTRL);
    return;
}

/* Read the 4 byte, page aligned 8390 specific header. */
@@ -689,7 +688,6 @@ el2_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring
    }
    blocked:;
    outb_p(ei_status.interface_num == 0 ? ECNTRL_THIN : ECNTRL_AUI, E33G_CNTRL);
    return;
}


+0 −1
Original line number Diff line number Diff line
@@ -764,7 +764,6 @@ static void init_82586_mem(struct net_device *dev)
	if (net_debug > 4)
		pr_debug("%s: Initialized 82586, status %04x.\n", dev->name,
			   readw(shmem+iSCB_STATUS));
	return;
}

static void hardware_send_packet(struct net_device *dev, void *buf, short length, short pad)
+0 −1
Original line number Diff line number Diff line
@@ -1037,7 +1037,6 @@ static void update_stats(struct net_device *dev)
	/* Back to window 1, and turn statistics back on. */
	EL3WINDOW(1);
	outw(StatsEnable, ioaddr + EL3_CMD);
	return;
}

static int
+0 −2
Original line number Diff line number Diff line
@@ -958,7 +958,6 @@ static void corkscrew_timer(unsigned long data)
		       dev->name, media_tbl[dev->if_port].name);

#endif				/* AUTOMEDIA */
	return;
}

static void corkscrew_timeout(struct net_device *dev)
@@ -1516,7 +1515,6 @@ static void update_stats(int ioaddr, struct net_device *dev)

	/* We change back to window 7 (not 1) with the Vortex. */
	EL3WINDOW(7);
	return;
}

/* This new version of set_rx_mode() supports v1.4 kernels.
Loading