sh_eth: uninline sh_eth_tsu_get_offset()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Mon, 23 Jul 2018 18:10:02 +0000 (21:10 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Jul 2018 19:34:50 +0000 (12:34 -0700)
sh_eth_tsu_get_offset() is called several  times  by the driver, remove
*inline* and move  that function  from the header to the driver  itself
to let gcc decide  whether to expand it inline or not...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c
drivers/net/ethernet/renesas/sh_eth.h

index 314aeb5..1f8d5a0 100644 (file)
@@ -439,6 +439,11 @@ static void sh_eth_modify(struct net_device *ndev, int enum_index, u32 clear,
                     enum_index);
 }
 
+static void *sh_eth_tsu_get_offset(struct sh_eth_private *mdp, int enum_index)
+{
+       return mdp->tsu_addr + mdp->reg_offset[enum_index];
+}
+
 static void sh_eth_tsu_write(struct sh_eth_private *mdp, u32 data,
                             int enum_index)
 {
index 140ad2c..f94be99 100644 (file)
@@ -558,10 +558,4 @@ struct sh_eth_private {
        unsigned wol_enabled:1;
 };
 
-static inline void *sh_eth_tsu_get_offset(struct sh_eth_private *mdp,
-                                         int enum_index)
-{
-       return mdp->tsu_addr + mdp->reg_offset[enum_index];
-}
-
 #endif /* #ifndef __SH_ETH_H__ */