[linux-next:master 9748/10090] drivers/i2c/busses/i2c-cp2615.c:88:23: sparse: sparse: incorrect type in assignment (different base types)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   9c54130cd25528028b2d38f6ada0c79e92210390
commit: 4a7695429eade517b07ea72f9ec366130e81a076 [9748/10090] i2c: cp2615: add i2c driver for Silicon Labs' CP2615 Digital Audio Bridge
config: x86_64-randconfig-s032-20210407 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-279-g6d5d9b42-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=4a7695429eade517b07ea72f9ec366130e81a076
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 4a7695429eade517b07ea72f9ec366130e81a076
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
>> drivers/i2c/busses/i2c-cp2615.c:88:23: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] preamble @@     got int @@
   drivers/i2c/busses/i2c-cp2615.c:88:23: sparse:     expected restricted __be16 [usertype] preamble
   drivers/i2c/busses/i2c-cp2615.c:88:23: sparse:     got int

vim +88 drivers/i2c/busses/i2c-cp2615.c

    78	
    79	static int cp2615_init_iop_msg(struct cp2615_iop_msg *ret, enum cp2615_iop_msg_type msg,
    80				const void *data, size_t data_len)
    81	{
    82		if (data_len > MAX_IOP_PAYLOAD_SIZE)
    83			return -EFBIG;
    84	
    85		if (!ret)
    86			return -EINVAL;
    87	
  > 88		ret->preamble = 0x2A2A;
    89		ret->length = htons(data_len + 6);
    90		ret->msg = htons(msg);
    91		if (data && data_len)
    92			memcpy(&ret->data, data, data_len);
    93		return 0;
    94	}
    95	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux