summaryrefslogtreecommitdiff
path: root/include/net.h
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-11-08 22:25:14 -0200
committerJoe Hershberger <joe.hershberger@ni.com>2015-12-21 19:57:33 -0600
commit92163873542207fda6953d5cd807b7e153ea32e6 (patch)
tree3ea3d2ea222432bfead7ba38eda973c56c198bc5 /include/net.h
parentbc393a7954f741aeeb6da5a3161fe0961fa10be5 (diff)
downloadu-boot-imx-92163873542207fda6953d5cd807b7e153ea32e6.zip
u-boot-imx-92163873542207fda6953d5cd807b7e153ea32e6.tar.gz
u-boot-imx-92163873542207fda6953d5cd807b7e153ea32e6.tar.bz2
include: net: Simplify the usage of __always_inline
Since commit de4d2e9e7ce0f9 (" bitops: Add fls_long and __ffs64") <linux/compiler.h> is included in include/linux/bitops.h, which allows us to marking a function as 'always_inline' in a simpler format. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/net.h b/include/net.h
index ebed29a..ac44d61 100644
--- a/include/net.h
+++ b/include/net.h
@@ -181,8 +181,7 @@ int eth_unregister(struct eth_device *dev);/* Remove network device */
extern struct eth_device *eth_current;
-static inline __attribute__((always_inline))
-struct eth_device *eth_get_dev(void)
+static __always_inline struct eth_device *eth_get_dev(void)
{
return eth_current;
}
@@ -200,14 +199,14 @@ static inline unsigned char *eth_get_ethaddr(void)
/* Used only when NetConsole is enabled */
int eth_is_active(struct eth_device *dev); /* Test device for active state */
/* Set active state */
-static inline __attribute__((always_inline)) int eth_init_state_only(void)
+static __always_inline int eth_init_state_only(void)
{
eth_get_dev()->state = ETH_STATE_ACTIVE;
return 0;
}
/* Set passive state */
-static inline __attribute__((always_inline)) void eth_halt_state_only(void)
+static __always_inline void eth_halt_state_only(void)
{
eth_get_dev()->state = ETH_STATE_PASSIVE;
}
@@ -657,7 +656,7 @@ int nc_input_packet(uchar *pkt, struct in_addr src_ip, unsigned dest_port,
unsigned src_port, unsigned len);
#endif
-static inline __attribute__((always_inline)) int eth_is_on_demand_init(void)
+static __always_inline int eth_is_on_demand_init(void)
{
#ifdef CONFIG_NETCONSOLE
extern enum proto_t net_loop_last_protocol;