Message ID | 20240422123921.854943-1-leitao@debian.org |
---|---|
Headers | show |
Series | allocate dummy device dynamically | expand |
Breno Leitao <leitao@debian.org> writes: > Embedding net_device into structures prohibits the usage of flexible > arrays in the net_device structure. For more details, see the discussion > at [1]. > > Un-embed the net_device from struct ath10k by converting it > into a pointer. Then use the leverage alloc_netdev() to allocate the > net_device object at ath10k_core_create(). The free of the device occurs > at ath10k_core_destroy(). > > [1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ > > Signed-off-by: Breno Leitao <leitao@debian.org> I assume this goes via net-next: Acked-by: Kalle Valo <kvalo@kernel.org>
Hello: This series was applied to netdev/net-next.git (main) by David S. Miller <davem@davemloft.net>: On Mon, 22 Apr 2024 05:38:53 -0700 you wrote: > struct net_device shouldn't be embedded into any structure, instead, > the owner should use the private space to embed their state into > net_device. > > But, in some cases the net_device is embedded inside the private > structure, which blocks the usage of zero-length arrays inside > net_device. > > [...] Here is the summary with links: - [net-next,v7,01/10] net: core: Fix documentation https://git.kernel.org/netdev/net-next/c/c6e7f276841d - [net-next,v7,02/10] net: free_netdev: exit earlier if dummy https://git.kernel.org/netdev/net-next/c/f8d05679fb3f - [net-next,v7,03/10] net: create a dummy net_device allocator https://git.kernel.org/netdev/net-next/c/c661050f93d3 - [net-next,v7,04/10] net: marvell: prestera: allocate dummy net_device dynamically https://git.kernel.org/netdev/net-next/c/ec24c06eb312 - [net-next,v7,05/10] net: mediatek: mtk_eth_sock: allocate dummy net_device dynamically https://git.kernel.org/netdev/net-next/c/b209bd6d0bff - [net-next,v7,06/10] net: ipa: allocate dummy net_device dynamically https://git.kernel.org/netdev/net-next/c/1bdab0ee635d - [net-next,v7,07/10] net: ibm/emac: allocate dummy net_device dynamically https://git.kernel.org/netdev/net-next/c/2eb5e25d8495 - [net-next,v7,08/10] wifi: qtnfmac: Use netdev dummy allocator helper https://git.kernel.org/netdev/net-next/c/4a8b77eff7e5 - [net-next,v7,09/10] wifi: ath10k: allocate dummy net_device dynamically https://git.kernel.org/netdev/net-next/c/57738dab12d9 - [net-next,v7,10/10] wifi: ath11k: allocate dummy net_device dynamically https://git.kernel.org/netdev/net-next/c/bca592ead825 You are awesome, thank you!