tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 
master
head:   b69ab96ab13ddaa28a506a2433ae5b12669615e8
commit: e65d4d96334e3ff4fe0064612a93a51c63de08de [408/425] rds: Remove IPv6 
dependency
reproduce:
        # apt-get install sparse
        git checkout e65d4d96334e3ff4fe0064612a93a51c63de08de
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> net/rds/connection.c:71:31: sparse: incorrect type in argument 1 (different 
>> base types) @@    expected restricted __be32 const [usertype] laddr @@    
>> got unsigned inrestricted __be32 const [usertype] laddr @@
   net/rds/connection.c:71:31:    expected restricted __be32 const [usertype] 
laddr
   net/rds/connection.c:71:31:    got unsigned int [unsigned] [assigned] 
[usertype] lhash
>> net/rds/connection.c:71:41: sparse: incorrect type in argument 3 (different 
>> base types) @@    expected restricted __be32 const [usertype] faddr @@    
>> got unsigned inrestricted __be32 const [usertype] faddr @@
   net/rds/connection.c:71:41:    expected restricted __be32 const [usertype] 
faddr
   net/rds/connection.c:71:41:    got unsigned int [unsigned] [assigned] 
[usertype] fhash
   include/linux/slab.h:631:13: sparse: undefined identifier 
'__builtin_mul_overflow'
   include/linux/slab.h:631:13: sparse: call with no type!

vim +71 net/rds/connection.c

    53  
    54  static struct hlist_head *rds_conn_bucket(const struct in6_addr *laddr,
    55                                            const struct in6_addr *faddr)
    56  {
    57          static u32 rds6_hash_secret __read_mostly;
    58          static u32 rds_hash_secret __read_mostly;
    59  
    60          u32 lhash, fhash, hash;
    61  
    62          net_get_random_once(&rds_hash_secret, sizeof(rds_hash_secret));
    63          net_get_random_once(&rds6_hash_secret, 
sizeof(rds6_hash_secret));
    64  
    65          lhash = (__force u32)laddr->s6_addr32[3];
    66  #if IS_ENABLED(CONFIG_IPV6)
    67          fhash = __ipv6_addr_jhash(faddr, rds6_hash_secret);
    68  #else
    69          fhash = (__force u32)faddr->s6_addr32[3];
    70  #endif
  > 71          hash = __inet_ehashfn(lhash, 0, fhash, 0, rds_hash_secret);
    72  
    73          return &rds_conn_hash[hash & RDS_CONNECTION_HASH_MASK];
    74  }
    75  

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

Reply via email to