[Intel-wired-lan] [PATCH] ice: Use correct order for the parameters of devm_kcalloc()
G, GurucharanX
gurucharanx.g at intel.com
Wed May 25 03:14:29 UTC 2022
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Christophe JAILLET
> Sent: Saturday, May 21, 2022 12:27 PM
> To: Brandeburg, Jesse <jesse.brandeburg at intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen at intel.com>; David S. Miller <davem at davemloft.net>;
> Eric Dumazet <edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>;
> Paolo Abeni <pabeni at redhat.com>
> Cc: Christophe JAILLET <christophe.jaillet at wanadoo.fr>; intel-wired-
> lan at lists.osuosl.org; kernel-janitors at vger.kernel.org; linux-
> kernel at vger.kernel.org; netdev at vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH] ice: Use correct order for the parameters
> of devm_kcalloc()
>
> We should have 'n', then 'size', not the opposite.
> This is harmless because the 2 values are just multiplied, but having the
> correct order silence a (unpublished yet) smatch warning.
>
> While at it use '*tun_seg' instead '*seg'. The both variable have the same
> type, so the result is the same, but it lokks more logical.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
> ---
> drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Tested-by: Gurucharan <gurucharanx.g at intel.com> (A Contingent worker at Intel)
More information about the Intel-wired-lan
mailing list