Re: [PATCH v3 net-next] net: use get_random_u{16,32,64}() where appropriate

Andrew Lunn
2026-04-05T23:51:26Z

On Sun, Apr 05, 2026 at 04:48:16PM +0100, David Carlier wrote:
> Use the typed random integer helpers instead of
> get_random_bytes() when filling a single integer variable.
> The helpers return the value directly, require no pointer
> or size argument, and better express intent.
>
> Skipped sites writing into __be16 fields (netdevsim) where
> a direct assignment would trigger sparse endianness warnings.
>
> Signed-off-by: David Carlier <devnexen@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Andrew