• Jesse Brandeburg's avatar
    dim: initialize all struct fields · ee1444b5
    Jesse Brandeburg authored
    The W=2 build pointed out that the code wasn't initializing all the
    variables in the dim_cq_moder declarations with the struct initializers.
    The net change here is zero since these structs were already static
    const globals and were initialized with zeros by the compiler, but
    removing compiler warnings has value in and of itself.
    
    lib/dim/net_dim.c: At top level:
    lib/dim/net_dim.c:54:9: warning: missing initializer for field ‘comps’ of ‘const struct dim_cq_moder’ [-Wmissing-field-initializers]
       54 |         NET_DIM_RX_EQE_PROFILES,
          |         ^~~~~~~~~~~~~~~~~~~~~~~
    In file included from lib/dim/net_dim.c:6:
    ./include/linux/dim.h:45:13: note: ‘comps’ declared here
       45 |         u16 comps;
          |             ^~~~~
    
    and repeats for the tx struct, and once you fix the comps entry then
    the cq_period_mode field needs the same treatment.
    
    Use the commonly accepted style to indicate to the compiler that we
    know what we're doing, and add a comma at the end of...
    ee1444b5
net_dim.c 6.26 KB