Thread (9 messages) 9 messages, 4 authors, 2014-01-16

[PATCH v5 net-next 1/4] sh_eth: Use bool as return type of sh_eth_is_gether()

flat view
STALE4653d

From: joe@perches.com (Joe Perches)
Date: 2014-01-15 09:35:20
Also in: linux-sh, netdev

On Wed, 2014-01-15 at 15:12 +0900, Simon Horman wrote:
Return a boolean and use true and false.
[]
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
[]
quoted hunk ↗ jump to hunk
@@ -310,12 +310,12 @@ static const u16 sh_eth_offset_fast_sh3_sh2[SH_ETH_MAX_REGISTER_OFFSET] = {
 	[TSU_ADRL31]	= 0x01fc,
 };
 
-static int sh_eth_is_gether(struct sh_eth_private *mdp)
+static bool sh_eth_is_gether(struct sh_eth_private *mdp)
 {
 	if (mdp->reg_offset == sh_eth_offset_gigabit)
-		return 1;
+		return true;
 	else
-		return 0;
+		return false;
 }
Or maybe:

static bool sh_eth_is_gether(struct sh_eth_private *mdp)
{
	return mdp->reg_offset == sh_eth_offset_gigabit;
}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help