mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
net: ALIGN/PTR_ALIGN cleanup in alloc_netdev_mq()/netdev_priv()
Use ALIGN() and PTR_ALIGN() macros instead of handcoding them. Get rid of NETDEV_ALIGN_CONST ugly define Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
0bb32417ff
commit
1ce8e7b57b
3 changed files with 7 additions and 15 deletions
|
|
@ -735,9 +735,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
|
|||
* +-------------------------+
|
||||
*
|
||||
*/
|
||||
priv_size = ((sizeof(struct ieee80211_local) +
|
||||
NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST) +
|
||||
priv_data_len;
|
||||
priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len;
|
||||
|
||||
wiphy = wiphy_new(&mac80211_config_ops, priv_size);
|
||||
|
||||
|
|
@ -754,9 +752,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
|
|||
|
||||
local->hw.wiphy = wiphy;
|
||||
|
||||
local->hw.priv = (char *)local +
|
||||
((sizeof(struct ieee80211_local) +
|
||||
NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST);
|
||||
local->hw.priv = (char *)local + ALIGN(sizeof(*local), NETDEV_ALIGN);
|
||||
|
||||
BUG_ON(!ops->tx);
|
||||
BUG_ON(!ops->start);
|
||||
|
|
|
|||
Loading…
Reference in a new issue