Hi Paolo,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    
https://github.com/0day-ci/linux/commits/Paolo-Abeni/net-core-rework-basic-flow-dissection-helper/20180505-090417
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   include/net/tipc.h:55:30: sparse: incorrect type in return expression 
(different base types) @@    expected unsigned int @@    got restriunsigned int 
@@
   include/net/tipc.h:55:30:    expected unsigned int
   include/net/tipc.h:55:30:    got restricted __be32 <noident>
   net/core/flow_dissector.c:840:48: sparse: incorrect type in assignment 
(different base types) @@    expected restricted __be32 [usertype] key @@    
got  [usertype] key @@
   net/core/flow_dissector.c:840:48:    expected restricted __be32 [usertype] 
key
   net/core/flow_dissector.c:840:48:    got unsigned int
   net/core/flow_dissector.c:1035:30: sparse: expression using sizeof(void)
   net/core/flow_dissector.c:1035:30: sparse: expression using sizeof(void)
   net/core/flow_dissector.c:1276:25: sparse: expression using sizeof(void)
>> net/core/flow_dissector.c:1319:59: sparse: Using plain integer as NULL 
>> pointer

vim +1319 net/core/flow_dissector.c

  1305  
  1306  /**
  1307   * skb_get_poff - get the offset to the payload
  1308   * @skb: sk_buff to get the payload offset from
  1309   *
  1310   * The function will get the offset to the payload as far as it could
  1311   * be dissected.  The main user is currently BPF, so that we can 
dynamically
  1312   * truncate packets without needing to push actual payload to the user
  1313   * space and can analyze headers only, instead.
  1314   */
  1315  u32 skb_get_poff(const struct sk_buff *skb)
  1316  {
  1317          struct flow_keys_basic keys;
  1318  
> 1319          if (!skb_flow_dissect_flow_keys_basic(skb, &keys, 0, 0, 0, 0, 
> 0))
  1320                  return 0;
  1321  
  1322          return __skb_get_poff(skb, skb->data, &keys, skb_headlen(skb));
  1323  }
  1324  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Reply via email to