lkml.org 
[lkml]   [2023]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: ena: initialize dim_sample
Sun, Jan 08, 2023 at 03:38:43PM CET, trix@redhat.com wrote:
>clang static analysis reports this problem
>drivers/net/ethernet/amazon/ena/ena_netdev.c:1821:2: warning: Passed-by-value struct
> argument contains uninitialized data (e.g., field: 'comp_ctr') [core.CallAndMessage]
> net_dim(&ena_napi->dim, dim_sample);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>net_dim can call dim_calc_stats() which uses the comp_ctr element,
>so it must be initialized.
>
>Fixes: 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive interrupt moderation")
>Signed-off-by: Tom Rix <trix@redhat.com>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

\
 
 \ /
  Last update: 2023-03-26 23:35    [W:0.055 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site