[PATCH] hwrng: stm32 - use sizeof(*priv) instead of sizeof(struct stm32_rng_private)

Uwe Kleine-König ukleinek at kernel.org
Fri May 31 03:50:44 PDT 2024


On Fri, May 31, 2024 at 10:57:34AM +0200, Marek Vasut wrote:
> Use sizeof(*priv) instead of sizeof(struct stm32_rng_private), the
> former makes renaming of struct stm32_rng_private easier if necessary,
> as it removes one site where such rename has to happen. No functional
> change.

IMHO the main upside is that it's easier to spot that the allocation
size is correct.

Acked-by: Uwe Kleine-König <ukleinek at kernel.org>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240531/4dfc9d5d/attachment.sig>


More information about the linux-arm-kernel mailing list