Re: [PATCH] crypto: omap - convert reqctx buffer to fixed-size array

From: Herbert Xu

Date: Sun Apr 12 2026 - 05:17:25 EST


On Sat, Apr 04, 2026 at 12:10:17PM +0200, Thorsten Blum wrote:
> The flexible array member 'buffer' in 'omap_sham_reqctx' is always
> allocated with BUFLEN bytes. Replace the flexible array with a
> fixed-size array and remove the now-redundant 'buflen' field.
>
> Since 'struct omap_sham_reqctx' now includes the buffer, simplify
> 'reqsize' and 'statesize' and use an offsetof-based memcpy() in
> omap_sham_export() and omap_sham_import().
>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
> ---
> drivers/crypto/omap-sham.c | 21 ++++++++++-----------
> 1 file changed, 10 insertions(+), 11 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt