Skip to content

Commit 504c8ca

Browse files
hormsdavem330
authored andcommitted
sh_eth: Use bool as return type of sh_eth_is_gether()
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]>
1 parent 6a7cc41 commit 504c8ca

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/net/ethernet/renesas/sh_eth.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,9 @@ static const u16 sh_eth_offset_fast_sh3_sh2[SH_ETH_MAX_REGISTER_OFFSET] = {
309309
[TSU_ADRL31] = 0x01fc,
310310
};
311311

312-
static int sh_eth_is_gether(struct sh_eth_private *mdp)
312+
static bool sh_eth_is_gether(struct sh_eth_private *mdp)
313313
{
314-
if (mdp->reg_offset == sh_eth_offset_gigabit)
315-
return 1;
316-
else
317-
return 0;
314+
return mdp->reg_offset == sh_eth_offset_gigabit;
318315
}
319316

320317
static void sh_eth_select_mii(struct net_device *ndev)

0 commit comments

Comments
 (0)