Skip to content

Commit

Permalink
sh_eth: Use bool as return type of sh_eth_is_gether()
Browse files Browse the repository at this point in the history
Return a boolean from sh_eth_is_gether() and refactor it as a one-liner.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Simon Horman authored and David S. Miller committed Jan 18, 2014
1 parent 6a7cc41 commit 504c8ca
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/net/ethernet/renesas/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 504c8ca

Please sign in to comment.