linux/dim: Do nothing if no time delta between samples
Add return value for dim_calc_stats. This is an indication for the caller if curr_stats was assigned by the function. Avoid using curr_stats uninitialized over {rdma/net}_dim, when no time delta between samples. Coverity reported this potential use of an uninitialized variable. Fixes: 4c4dbb4a ("net/mlx5e: Move dynamic interrupt coalescing code to include/linux") Fixes: cb3c7fd4 ("net/mlx5e: Support adaptive RX coalescing") Signed-off-by: NRoy Novich <royno@nvidia.com> Reviewed-by: NAya Levin <ayal@nvidia.com> Reviewed-by: NSaeed Mahameed <saeedm@nvidia.com> Signed-off-by: NTariq Toukan <tariqt@nvidia.com> Reviewed-by: NLeon Romanovsky <leonro@nvidia.com> Reviewed-by: NMichal Kubiak <michal.kubiak@intel.com> Link: https://lore.kernel.org/r/20230507135743.138993-1-tariqt@nvidia.comSigned-off-by: NPaolo Abeni <pabeni@redhat.com>
Showing
想要评论请 注册 或 登录