aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/renesas
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2018-07-23 21:12:38 +0300
committerDavid S. Miller <davem@davemloft.net>2018-07-23 12:34:50 -0700
commitecbecb0a90fbc318163dd1747bd325e08aee4b12 (patch)
treeb2c6be2174cb310c8e161766fba254880ab44dfc /drivers/net/ethernet/renesas
parent41414f0a8568d1f395d823bc65e68ee0805d794f (diff)
downloadlinux-ecbecb0a90fbc318163dd1747bd325e08aee4b12.tar.gz
sh_eth: call sh_eth_tsu_get_offset() from TSU register accessors
With sh_eth_tsu_get_offset() now actually returning TSU register's offset, we can at last use it in sh_eth_tsu_{read|write}(). Somehow this saves 248 bytes of object code with AArch64 gcc 4.8.5... :-) Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas')
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index b813ef4ea51a..bf002c2b5d79 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -447,7 +447,7 @@ static u16 sh_eth_tsu_get_offset(struct sh_eth_private *mdp, int enum_index)
static void sh_eth_tsu_write(struct sh_eth_private *mdp, u32 data,
int enum_index)
{
- u16 offset = mdp->reg_offset[enum_index];
+ u16 offset = sh_eth_tsu_get_offset(mdp, enum_index);
if (WARN_ON(offset == SH_ETH_OFFSET_INVALID))
return;
@@ -457,7 +457,7 @@ static void sh_eth_tsu_write(struct sh_eth_private *mdp, u32 data,
static u32 sh_eth_tsu_read(struct sh_eth_private *mdp, int enum_index)
{
- u16 offset = mdp->reg_offset[enum_index];
+ u16 offset = sh_eth_tsu_get_offset(mdp, enum_index);
if (WARN_ON(offset == SH_ETH_OFFSET_INVALID))
return ~0U;