firmware: imx: secure-enclave: use kzalloc_obj() for allocations
PATCH 1/1 firmware: imx: secure-enclave: use kzalloc_obj() for allocations
Replace kzalloc(sizeof(*ptr), ...) with kzalloc_obj() for object allocations to follow current kernel allocation style and reduce boilerplate.
No functional change intended.
This is a cleanup reported after initial merge and is intended to be squashed into the original commit.
--- drivers/firmware/imx/se_ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/imx/se_ctrl.c +2 -2
@@ -379,7 +379,7 @@ static int add_b_desc_to_pending_list(void *shared_ptr_with_pos,struct se_shared_mem_mgmt_info *se_shared_mem_mgmt = &dev_ctx->se_shared_mem_mgmt;struct se_buf_desc *b_desc; - b_desc =kzalloc (sizeof (*b_desc),GFP_KERNEL ); + b_desc =kzalloc_obj (*b_desc,GFP_KERNEL );if (!b_desc)return -ENOMEM ;
@@ -464,7 +464,7 @@ static int init_device_context(struct se_if_priv *priv, int ch_id,struct se_if_device_ctx *dev_ctx;int ret =0 ; - dev_ctx =kzalloc (sizeof (*dev_ctx),GFP_KERNEL ); + dev_ctx =kzalloc_obj (*dev_ctx,GFP_KERNEL );if (!dev_ctx)return -ENOMEM ;
Signature · 1 line
2.43.0
Quoted 10 lines · Pankaj Gupta
Replace
kzalloc(sizeof(*ptr), ...)withkzalloc_obj()for object allocations to follow current kernel allocation style and reduce boilerplate.No functional change intended.
This is a cleanup reported after initial merge and is intended to be squashed into the original commit.
[...]
Applied, thanks!
[1/1] firmware: imx: secure-enclave: use kzalloc_obj() for allocations squashed
Best regards,
--
Frank Li <[email protected]>