spi: axi-spi-engine: use struct_size() macro
authorDavid Lechner <dlechner@baylibre.com>
Mon, 4 Mar 2024 16:04:25 +0000 (10:04 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 4 Mar 2024 17:44:00 +0000 (17:44 +0000)
commit5c708541301e695b611cb0b9c6d732bed9b5d904
treeddd4121d707c1d4b33988b8ac02fb8f261f5a5d4
parentc8340ac1015471ec5af234beff535efe15f382e9
spi: axi-spi-engine: use struct_size() macro

This makes use of the struct_size() macro to calculate the size of the
struct axi_spi_engine when allocating it.

Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://msgid.link/r/20240304-mainline-axi-spi-engine-small-cleanups-v2-3-5b14ed729a31@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-axi-spi-engine.c