projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a7cc41
)
sh_eth: Use bool as return type of sh_eth_is_gether()
author
Simon Horman
<
[email protected]
>
Fri, 17 Jan 2014 00:22:27 +0000
(09:22 +0900)
committer
David S. Miller
<
[email protected]
>
Sat, 18 Jan 2014 02:13:58 +0000
(18:13 -0800)
Return a boolean from sh_eth_is_gether() and refactor it as a one-liner.
Signed-off-by: Simon Horman <
[email protected]
>
Acked-by: Sergei Shtylyov <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/renesas/sh_eth.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/renesas/sh_eth.c
b/drivers/net/ethernet/renesas/sh_eth.c
index 43d0a0db6e0d0b838c4b314ab0f35c4892a9caaf..fe2c8bb4d2f19009e1408b45a8223031daad4bd8 100644
(file)
--- a/
drivers/net/ethernet/renesas/sh_eth.c
+++ b/
drivers/net/ethernet/renesas/sh_eth.c
@@
-309,12
+309,9
@@
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;
- else
- return 0;
+ return mdp->reg_offset == sh_eth_offset_gigabit;
}
static void sh_eth_select_mii(struct net_device *ndev)