aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 371ece521e58..14efce33c002 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -905,7 +905,6 @@ struct net_device
905#define to_net_dev(d) container_of(d, struct net_device, dev) 905#define to_net_dev(d) container_of(d, struct net_device, dev)
906 906
907#define NETDEV_ALIGN 32 907#define NETDEV_ALIGN 32
908#define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1)
909 908
910static inline 909static inline
911struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev, 910struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev,
@@ -976,9 +975,7 @@ static inline bool netdev_uses_trailer_tags(struct net_device *dev)
976 */ 975 */
977static inline void *netdev_priv(const struct net_device *dev) 976static inline void *netdev_priv(const struct net_device *dev)
978{ 977{
979 return (char *)dev + ((sizeof(struct net_device) 978 return (char *)dev + ALIGN(sizeof(struct net_device), NETDEV_ALIGN);
980 + NETDEV_ALIGN_CONST)
981 & ~NETDEV_ALIGN_CONST);
982} 979}
983 980
984/* Set the sysfs physical device reference for the network logical device 981/* Set the sysfs physical device reference for the network logical device