Subject: Re: [net-next 2/3] tipc: make node number calculation reproducible

From: kernel test robot <[email-masked]>
Date: Wed, 25 Nov 2020 11:40:06 +0800

Hi,

I love your patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/jmaloy-redhat-com/tipc-some-minor-improvements/20201125-013225
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git d5a05e69ac6e4c431c380ced2b534c91f7bc3280
config: i386-randconfig-s002-20201125 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-151-g540c2c4b-dirty
        # https://github.com/0day-ci/linux/commit/417ce7b0ea8ed268ee0302eb02ee6eaa55f22f9b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review jmaloy-redhat-com/tipc-some-minor-improvements/20201125-013225
        git checkout 417ce7b0ea8ed268ee0302eb02ee6eaa55f22f9b
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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

"sparse warnings: (new ones prefixed by >>)"
   net/tipc/addr.c: note: in included file (through net/tipc/addr.h):
>> net/tipc/core.h:218:15: sparse: sparse: cast to restricted __be32
>> net/tipc/core.h:218:15: sparse: sparse: cast to restricted __be32
>> net/tipc/core.h:218:15: sparse: sparse: cast to restricted __be32
>> net/tipc/core.h:218:15: sparse: sparse: cast to restricted __be32
>> net/tipc/core.h:218:15: sparse: sparse: cast to restricted __be32
>> net/tipc/core.h:218:15: sparse: sparse: cast to restricted __be32
   net/tipc/core.h:222:27: sparse: sparse: cast to restricted __be32
   net/tipc/core.h:222:27: sparse: sparse: cast to restricted __be32
   net/tipc/core.h:222:27: sparse: sparse: cast to restricted __be32
   net/tipc/core.h:222:27: sparse: sparse: cast to restricted __be32
   net/tipc/core.h:222:27: sparse: sparse: cast to restricted __be32
   net/tipc/core.h:222:27: sparse: sparse: cast to restricted __be32

vim +218 net/tipc/core.h

   213	
   214	static inline u32 hash128to32(char *bytes)
   215	{
   216		u32 res, *tmp = (u32 *)bytes;
   217	
 > 218		res = ntohl(tmp[0] ^ tmp[1] ^ tmp[2] ^ tmp[3]);
   219		if (likely(res))
   220			return res;
   221		res = tmp[0] | tmp[1] | tmp[2] | tmp[3];
   222		return !res ? 0 : ntohl(18140715);
   223	}
   224	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email-masked]