CC: [email protected]
BCC: [email protected]
CC: [email protected]
TO: Paul Blakey <[email protected]>
CC: Jakub Kicinski <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   30c8e80f79329617012f07b09b70114592092ea4
commit: 6f022c2ddbcefaee79502ce5386dfe351d457070 net: openvswitch: Fix ct_state 
nat flags for conns arriving from tc
date:   4 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 4 months ago
compiler: sparc64-linux-gcc (GCC) 11.3.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout 6f022c2ddbcefaee79502ce5386dfe351d457070
        cppcheck --quiet --enable=style,performance,portability --template=gcc 
FILE

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> net/openvswitch/flow.c:920:9: warning: Opposite inner 'if' condition leads 
>> to a dead code block. [oppositeInnerCondition]
       if (!post_ct_dnat)
           ^
   net/openvswitch/flow.c:862:61: note: 'post_ct_dnat' is assigned value 
'false' here.
    bool post_ct = false, post_ct_snat = false, post_ct_dnat = false;
                                                               ^
   net/openvswitch/flow.c:862:17: note: 'post_ct' is assigned value 'false' 
here.
    bool post_ct = false, post_ct_snat = false, post_ct_dnat = false;
                   ^
   net/openvswitch/flow.c:916:7: note: outer condition: post_ct
     if (post_ct) {
         ^
   net/openvswitch/flow.c:920:9: note: opposite inner condition: !post_ct_dnat
       if (!post_ct_dnat)
           ^
   net/openvswitch/flow.c:922:9: warning: Opposite inner 'if' condition leads 
to a dead code block. [oppositeInnerCondition]
       if (!post_ct_snat)
           ^
   net/openvswitch/flow.c:862:39: note: 'post_ct_snat' is assigned value 
'false' here.
    bool post_ct = false, post_ct_snat = false, post_ct_dnat = false;
                                         ^
   net/openvswitch/flow.c:862:17: note: 'post_ct' is assigned value 'false' 
here.
    bool post_ct = false, post_ct_snat = false, post_ct_dnat = false;
                   ^
   net/openvswitch/flow.c:916:7: note: outer condition: post_ct
     if (post_ct) {
         ^
   net/openvswitch/flow.c:922:9: note: opposite inner condition: !post_ct_snat
       if (!post_ct_snat)
           ^

vim +/if +920 net/openvswitch/flow.c

0714812134d7dc Jesse Gross     2014-10-03  912  
9dd7f8907c3705 Jarno Rajahalme 2017-02-09  913          err = key_extract(skb, 
key);
635d448a1cce4b Paul Blakey     2021-12-14  914          if (!err) {
d29334c15d33a6 wenxu           2021-03-16  915                  
ovs_ct_fill_key(skb, key, post_ct);   /* Must be after key_extract(). */
6f022c2ddbcefa Paul Blakey     2022-01-06  916                  if (post_ct) {
6f022c2ddbcefa Paul Blakey     2022-01-06  917                          if 
(!skb_get_nfct(skb)) {
635d448a1cce4b Paul Blakey     2021-12-14  918                                  
key->ct_zone = zone;
6f022c2ddbcefa Paul Blakey     2022-01-06  919                          } else {
6f022c2ddbcefa Paul Blakey     2022-01-06 @920                                  
if (!post_ct_dnat)
6f022c2ddbcefa Paul Blakey     2022-01-06  921                                  
        key->ct_state &= ~OVS_CS_F_DST_NAT;
6f022c2ddbcefa Paul Blakey     2022-01-06  922                                  
if (!post_ct_snat)
6f022c2ddbcefa Paul Blakey     2022-01-06  923                                  
        key->ct_state &= ~OVS_CS_F_SRC_NAT;
6f022c2ddbcefa Paul Blakey     2022-01-06  924                          }
6f022c2ddbcefa Paul Blakey     2022-01-06  925                  }
635d448a1cce4b Paul Blakey     2021-12-14  926          }
9dd7f8907c3705 Jarno Rajahalme 2017-02-09  927          return err;
83c8df26a3b654 Pravin B Shelar 2014-09-15  928  }
83c8df26a3b654 Pravin B Shelar 2014-09-15  929  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to