crypto: caam - Use struct_size()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 22 Jul 2023 14:53:58 +0000 (16:53 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 28 Jul 2023 10:20:25 +0000 (18:20 +0800)
commit6df04505f3b285f3bcfe81cf0461339b0f4ed41d
tree97c1e28558da268de45166b20a48f1e065511d13
parent81511798bdfb1a61f97569436789721aace942fb
crypto: caam - Use struct_size()

Use struct_size() instead of hand-writing it, when allocating a structure
with a flex array.

This is less verbose, more robust and more informative.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamhash.c