[xilinx-xlnx:xlnx_rebase_v5.15_LTS 42/1129] drivers/xen/pvcalls.c:64:34: sparse: sparse: incorrect type in return expression (different base types)

kernel test robot lkp at intel.com
Sat May 7 12:47:14 PDT 2022


tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head:   3076249fc30bf463f8390f89009de928ad3e95ff
commit: 96575d8afcbca7038f411f6b06628e37b9a988e5 [42/1129] xen/pvcalls: frontend enable
config: x86_64-randconfig-s021 (https://download.01.org/0day-ci/archive/20220508/202205080344.TkW6pghb-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/Xilinx/linux-xlnx/commit/96575d8afcbca7038f411f6b06628e37b9a988e5
        git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.15_LTS
        git checkout 96575d8afcbca7038f411f6b06628e37b9a988e5
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/xen/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/xen/pvcalls.c:64:34: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted __poll_t @@
   drivers/xen/pvcalls.c:64:34: sparse:     expected unsigned int
   drivers/xen/pvcalls.c:64:34: sparse:     got restricted __poll_t
>> drivers/xen/pvcalls.c:116:17: sparse: sparse: incorrect type in initializer (different base types) @@     expected restricted __poll_t ( *poll )( ... ) @@     got unsigned int ( * )( ... ) @@
   drivers/xen/pvcalls.c:116:17: sparse:     expected restricted __poll_t ( *poll )( ... )
   drivers/xen/pvcalls.c:116:17: sparse:     got unsigned int ( * )( ... )

vim +64 drivers/xen/pvcalls.c

    60	
    61	static unsigned int pvcalls_poll(struct file *file, struct socket *sock,
    62				       poll_table *wait)
    63	{
  > 64		return pvcalls_front_poll(file, sock, wait);
    65	}
    66	
    67	static int pvcalls_listen(struct socket *sock, int backlog)
    68	{
    69		return pvcalls_front_listen(sock, backlog);
    70	}
    71	
    72	static int pvcalls_stream_sendmsg(struct socket *sock, struct msghdr *msg,
    73					size_t len)
    74	{
    75		return pvcalls_front_sendmsg(sock, msg, len);
    76	}
    77	
    78	static int
    79	pvcalls_stream_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
    80			     int flags)
    81	{
    82		return pvcalls_front_recvmsg(sock, msg, len, flags);
    83	}
    84	
    85	static int pvcalls_release(struct socket *s)
    86	{
    87		return pvcalls_front_release(s);
    88	}
    89	
    90	static int pvcalls_shutdown(struct socket *s, int h)
    91	{
    92		return -ENOTSUPP;
    93	}
    94	
    95	static int sock_no_setsockopt(struct socket *sock, int level, int optname,
    96				   sockptr_t optval, unsigned int optlen)
    97	{
    98		return -ENOTSUPP;
    99	}
   100	
   101	static int sock_no_getsockopt(struct socket *sock, int level, int optname,
   102				   char __user *optval, int __user *optlen)
   103	{
   104		return -ENOTSUPP;
   105	}
   106	
   107	const struct proto_ops pvcalls_stream_ops = {
   108		.family = PF_INET,
   109		.owner = THIS_MODULE,
   110		.release = pvcalls_release,
   111		.bind = pvcalls_bind,
   112		.connect = pvcalls_stream_connect,
   113		.socketpair = sock_no_socketpair,
   114		.accept = pvcalls_accept,
   115		.getname = pvcalls_getname,
 > 116		.poll = pvcalls_poll,
   117		.ioctl = sock_no_ioctl,
   118		.listen = pvcalls_listen,
   119		.shutdown = pvcalls_shutdown,
   120		.setsockopt = sock_no_setsockopt,
   121		.getsockopt = sock_no_getsockopt,
   122		.sendmsg = pvcalls_stream_sendmsg,
   123		.recvmsg = pvcalls_stream_recvmsg,
   124		.mmap = sock_no_mmap,
   125		.sendpage = sock_no_sendpage,
   126	};
   127	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



More information about the linux-arm-kernel mailing list