Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: Use kcalloc()

From: Andrew Lunn
Date: Sun Jun 29 2025 - 14:17:43 EST


On Sun, Jun 29, 2025 at 02:35:50PM +0200, Christophe JAILLET wrote:
> Use kcalloc() instead of hand writing it. This is less verbose.
>
> Also move the initialization of 'count' to save some LoC.
>
> On a x86_64, with allmodconfig, as an example:
> Before:
> ======
> text data bss dec hex filename
> 18652 5920 64 24636 603c drivers/net/dsa/mv88e6xxx/devlink.o
>
> After:
> =====
> text data bss dec hex filename
> 18498 5920 64 24482 5fa2 drivers/net/dsa/mv88e6xxx/devlink.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew