]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
soc: qcom: wcnss: simplify allocation of req
authorRosen Penev <rosenp@gmail.com>
Fri, 27 Mar 2026 02:55:34 +0000 (19:55 -0700)
committerBjorn Andersson <andersson@kernel.org>
Mon, 30 Mar 2026 13:46:25 +0000 (08:46 -0500)
commit908061f0ad30aa08ce211c6a8f95d29102e570bd
tree1cf55de4a4e851c4dca33758bdf382ceae3ed3bf
parent79c9ede455820e179608f9d52584c74d19e13fb0
soc: qcom: wcnss: simplify allocation of req

Get rid of automatic kfree and move allocation down to where it's used.

Use kzalloc_flex as we're dealing with a flexible array member.

Use struct_size to avoid some pointer math.

Add __counted_by for extra runtime analysis. Move the counting variable
assignment to right after allocation as required by __counted_by.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://lore.kernel.org/r/20260327025534.7864-1-rosenp@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/wcnss_ctrl.c