a8c188f30d2887734c97374e00196131b688fc26
[openwrt/staging/mans0n.git] /
1 From 7b778ae4eb9cd6e1518e4e47902a104b13ae8929 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Thu, 11 Feb 2021 13:12:36 +0100
4 Subject: [PATCH] net: broadcom: bcm4908_enet: drop "inline" from C functions
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 It seems preferred to let compiler optimize code if applicable.
10 While at it drop unused enet_umac_maskset().
11
12 Suggested-by: Andrew Lunn <andrew@lunn.ch>
13 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
14 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
15 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
16 Signed-off-by: David S. Miller <davem@davemloft.net>
17 ---
18 drivers/net/ethernet/broadcom/bcm4908_enet.c | 19 +++++++------------
19 1 file changed, 7 insertions(+), 12 deletions(-)
20
21 --- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
22 +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
23 @@ -75,17 +75,17 @@ struct bcm4908_enet {
24 * R/W ops
25 */
26
27 -static inline u32 enet_read(struct bcm4908_enet *enet, u16 offset)
28 +static u32 enet_read(struct bcm4908_enet *enet, u16 offset)
29 {
30 return readl(enet->base + offset);
31 }
32
33 -static inline void enet_write(struct bcm4908_enet *enet, u16 offset, u32 value)
34 +static void enet_write(struct bcm4908_enet *enet, u16 offset, u32 value)
35 {
36 writel(value, enet->base + offset);
37 }
38
39 -static inline void enet_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set)
40 +static void enet_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set)
41 {
42 u32 val;
43
44 @@ -96,27 +96,22 @@ static inline void enet_maskset(struct b
45 enet_write(enet, offset, val);
46 }
47
48 -static inline void enet_set(struct bcm4908_enet *enet, u16 offset, u32 set)
49 +static void enet_set(struct bcm4908_enet *enet, u16 offset, u32 set)
50 {
51 enet_maskset(enet, offset, set, set);
52 }
53
54 -static inline u32 enet_umac_read(struct bcm4908_enet *enet, u16 offset)
55 +static u32 enet_umac_read(struct bcm4908_enet *enet, u16 offset)
56 {
57 return enet_read(enet, ENET_UNIMAC + offset);
58 }
59
60 -static inline void enet_umac_write(struct bcm4908_enet *enet, u16 offset, u32 value)
61 +static void enet_umac_write(struct bcm4908_enet *enet, u16 offset, u32 value)
62 {
63 enet_write(enet, ENET_UNIMAC + offset, value);
64 }
65
66 -static inline void enet_umac_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set)
67 -{
68 - enet_maskset(enet, ENET_UNIMAC + offset, mask, set);
69 -}
70 -
71 -static inline void enet_umac_set(struct bcm4908_enet *enet, u16 offset, u32 set)
72 +static void enet_umac_set(struct bcm4908_enet *enet, u16 offset, u32 set)
73 {
74 enet_set(enet, ENET_UNIMAC + offset, set);
75 }