Skip to content

Commit

Permalink
sh_eth: uninline sh_eth_tsu_get_offset()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sergei Shtylyov authored and David S. Miller committed Jul 23, 2018
1 parent fd800f6 commit 388c4bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions drivers/net/ethernet/renesas/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
6 changes: 0 additions & 6 deletions drivers/net/ethernet/renesas/sh_eth.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */

0 comments on commit 388c4bb

Please sign in to comment.