Re: [PATCH] net: dsa: felix: use kmemdup() to replace kmalloc + memcpy

From: Vladimir Oltean
Date: Tue Dec 07 2021 - 08:56:11 EST


On Mon, Dec 06, 2021 at 10:44:18PM -0800, Yihao Han wrote:
> Fix following coccicheck warning:
> /drivers/net/dsa/ocelot/felix_vsc9959.c:1627:13-20:
> WARNING opportunity for kmemdup
> /drivers/net/dsa/ocelot/felix_vsc9959.c:1506:16-23:
> WARNING opportunity for kmemdup
>
> Signed-off-by: Yihao Han <hanyihao@xxxxxxxx>
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>