]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
sh_eth: uninline sh_eth_soft_swap()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sat, 2 Jun 2018 19:38:56 +0000 (22:38 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Jun 2018 19:23:25 +0000 (15:23 -0400)
sh_eth_tsu_soft_swap() is called twice 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>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c
drivers/net/ethernet/renesas/sh_eth.h

index d9cadfb1bc4a74715ccc8329cd6737419852f6dd..82b03f13243e558c10b8fd24697c5e7c72407a77 100644 (file)
@@ -460,6 +460,17 @@ static u32 sh_eth_tsu_read(struct sh_eth_private *mdp, int enum_index)
        return ioread32(mdp->tsu_addr + offset);
 }
 
+static void sh_eth_soft_swap(char *src, int len)
+{
+#ifdef __LITTLE_ENDIAN
+       u32 *p = (u32 *)src;
+       u32 *maxp = p + ((len + sizeof(u32) - 1) / sizeof(u32));
+
+       for (; p < maxp; p++)
+               *p = swab32(*p);
+#endif
+}
+
 static void sh_eth_select_mii(struct net_device *ndev)
 {
        struct sh_eth_private *mdp = netdev_priv(ndev);
index d77de7651d8faced25aecee481056245480e72cf..726c55a82dd7b76e1d90a836cddcd66bcbf96a24 100644 (file)
@@ -560,18 +560,6 @@ struct sh_eth_private {
        unsigned wol_enabled:1;
 };
 
-static inline void sh_eth_soft_swap(char *src, int len)
-{
-#ifdef __LITTLE_ENDIAN
-       u32 *p = (u32 *)src;
-       u32 *maxp;
-       maxp = p + ((len + sizeof(u32) - 1) / sizeof(u32));
-
-       for (; p < maxp; p++)
-               *p = swab32(*p);
-#endif
-}
-
 static inline void *sh_eth_tsu_get_offset(struct sh_eth_private *mdp,
                                          int enum_index)
 {