OSDN Git Service

dmaengine: stm32-mdma: Use struct_size() in kzalloc()
authorGustavo A. R. Silva <gustavoars@kernel.org>
Thu, 8 Oct 2020 14:18:28 +0000 (09:18 -0500)
committerVinod Koul <vkoul@kernel.org>
Fri, 30 Oct 2020 08:40:27 +0000 (14:10 +0530)
commit8145dce88a788f178dfe19376e5d8645d1b87e05
treedf347a5369a872be0b3cd785c59aa0f9c4a44a54
parentd98793b5d4256faae76177178456214f55bc7083
dmaengine: stm32-mdma: Use struct_size() in kzalloc()

Make use of the new struct_size() helper instead of the offsetof() idiom.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20201008141828.GA20325@embeddedor
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/stm32-mdma.c