* [PATCH net-next] sh_eth: uninline TSU register accessors
@ 2018-02-27 11:58 Sergei Shtylyov
2018-02-27 17:04 ` Sergei Shtylyov
2018-02-27 19:40 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2018-02-27 11:58 UTC (permalink / raw)
To: netdev; +Cc: linux-renesas-soc
We have uninlined the sh_eth_{read|write}() functions introduced in the
commit 4a55530f38e ("net: sh_eth: modify the definitions of register").
Now remove *inline* from sh_eth_tsu_{read|write}() as well and move
these functions from the header to the driver itself. This saves 684
more bytes of object code (ARM gcc 4.8.5)...
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
drivers/net/ethernet/renesas/sh_eth.c | 11 +++++++++++
drivers/net/ethernet/renesas/sh_eth.h | 11 -----------
2 files changed, 11 insertions(+), 11 deletions(-)
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -439,6 +439,17 @@ static void sh_eth_modify(struct net_dev
enum_index);
}
+static void sh_eth_tsu_write(struct sh_eth_private *mdp, u32 data,
+ int enum_index)
+{
+ iowrite32(data, mdp->tsu_addr + mdp->reg_offset[enum_index]);
+}
+
+static u32 sh_eth_tsu_read(struct sh_eth_private *mdp, int enum_index)
+{
+ return ioread32(mdp->tsu_addr + mdp->reg_offset[enum_index]);
+}
+
static bool sh_eth_is_gether(struct sh_eth_private *mdp)
{
return mdp->reg_offset == sh_eth_offset_gigabit;
Index: net-next/drivers/net/ethernet/renesas/sh_eth.h
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.h
+++ net-next/drivers/net/ethernet/renesas/sh_eth.h
@@ -568,15 +568,4 @@ static inline void *sh_eth_tsu_get_offse
return mdp->tsu_addr + mdp->reg_offset[enum_index];
}
-static inline void sh_eth_tsu_write(struct sh_eth_private *mdp, u32 data,
- int enum_index)
-{
- iowrite32(data, mdp->tsu_addr + mdp->reg_offset[enum_index]);
-}
-
-static inline u32 sh_eth_tsu_read(struct sh_eth_private *mdp, int enum_index)
-{
- return ioread32(mdp->tsu_addr + mdp->reg_offset[enum_index]);
-}
-
#endif /* #ifndef __SH_ETH_H__ */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] sh_eth: uninline TSU register accessors
2018-02-27 11:58 [PATCH net-next] sh_eth: uninline TSU register accessors Sergei Shtylyov
@ 2018-02-27 17:04 ` Sergei Shtylyov
2018-02-27 19:40 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2018-02-27 17:04 UTC (permalink / raw)
To: netdev; +Cc: linux-renesas-soc, David Miller
On 02/27/2018 02:58 PM, Sergei Shtylyov wrote:
> We have uninlined the sh_eth_{read|write}() functions introduced in the
> commit 4a55530f38e ("net: sh_eth: modify the definitions of register").
> Now remove *inline* from sh_eth_tsu_{read|write}() as well and move
> these functions from the header to the driver itself. This saves 684
> more bytes of object code (ARM gcc 4.8.5)...
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
[...]
David, you may want to merge this to 'net.git' instead -- the same way as you
did with the patch uninlining the basic register accessors, it's up to you...
MBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] sh_eth: uninline TSU register accessors
2018-02-27 11:58 [PATCH net-next] sh_eth: uninline TSU register accessors Sergei Shtylyov
2018-02-27 17:04 ` Sergei Shtylyov
@ 2018-02-27 19:40 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-02-27 19:40 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: netdev, linux-renesas-soc
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Tue, 27 Feb 2018 14:58:16 +0300
> We have uninlined the sh_eth_{read|write}() functions introduced in the
> commit 4a55530f38e ("net: sh_eth: modify the definitions of register").
> Now remove *inline* from sh_eth_tsu_{read|write}() as well and move
> these functions from the header to the driver itself. This saves 684
> more bytes of object code (ARM gcc 4.8.5)...
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Applied to 'net', as requested in a followup.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-27 19:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-27 11:58 [PATCH net-next] sh_eth: uninline TSU register accessors Sergei Shtylyov
2018-02-27 17:04 ` Sergei Shtylyov
2018-02-27 19:40 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).