• Tom Rix's avatar
    octeontx2-af: initialize action variable · 33b5bc9e
    Tom Rix authored
    Clang static analysis reports this representative issue
    rvu_npc.c:898:15: warning: Assigned value is garbage
      or undefined
      req.match_id = action.match_id;
                   ^ ~~~~~~~~~~~~~~~
    
    The initial setting of action is conditional on
     if (is_mcam_entry_enabled(...))
    The later check of action.op will sometimes be garbage.
    So initialize action.
    
    Reduce setting of
      *(u64 *)&action = 0x00;
    to
      *(u64 *)&action = 0;
    
    Fixes: 967db352 ("octeontx2-af: add support for multicast/promisc packet replication feature")
    Signed-off-by: default avatarTom Rix <trix@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    33b5bc9e
rvu_npc.c 92.3 KB