diff options
author | Breno Leitao <leitao@debian.org> | 2024-07-02 11:55:54 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-07-04 10:19:24 -0700 |
commit | 0e1a4d427f58b843864d835ccb79c32a118c6a77 (patch) | |
tree | c222350c38072b3dc5ea56af445f28cace937399 /drivers/crypto/caam/caamalg_qi2.h | |
parent | 82c81e740defbe2cd9889ba76da15f99d7cba252 (diff) |
crypto: caam: Unembed net_dev structure in dpaa2
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_devices from struct dpaa2_caam_priv_per_cpu by
converting them into pointers, and allocating them dynamically. Use the
leverage alloc_netdev_dummy() to allocate the net_device object at
dpaa2_dpseci_setup().
The free of the device occurs at dpaa2_dpseci_disable().
Link: https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ [1]
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20240702185557.3699991-5-leitao@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/crypto/caam/caamalg_qi2.h')
-rw-r--r-- | drivers/crypto/caam/caamalg_qi2.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/caam/caamalg_qi2.h b/drivers/crypto/caam/caamalg_qi2.h index abb502bb675c..61d1219a202f 100644 --- a/drivers/crypto/caam/caamalg_qi2.h +++ b/drivers/crypto/caam/caamalg_qi2.h @@ -81,7 +81,7 @@ struct dpaa2_caam_priv { */ struct dpaa2_caam_priv_per_cpu { struct napi_struct napi; - struct net_device net_dev; + struct net_device *net_dev; int req_fqid; int rsp_fqid; int prio; |