[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209300316.RISR9DAV-lkp@intel.com>
Date: Fri, 30 Sep 2022 03:36:59 +0800
From: kernel test robot <lkp@...el.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [driver-core:kobject-const 11/18]
drivers/vdpa/vdpa_user/vduse_dev.c:1792:23: error: incompatible function
pointer types assigning to 'char *(*)(const struct device *, umode_t *)'
(aka 'char *(*)(const struct device *, unsigned short *)') from 'char
*(struct device *, umode_t *)' (aka 'ch...
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git kobject-const
head: bdafbcc6c07cf164a8b73f0dc3fa7b9b46ac5064
commit: f5d68da0e1475938c82f4956a3e3e97e35395d84 [11/18] driver core: make struct class.devnode() take a const *
config: x86_64-randconfig-a003
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?id=f5d68da0e1475938c82f4956a3e3e97e35395d84
git remote add driver-core https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
git fetch --no-tags driver-core kobject-const
git checkout f5d68da0e1475938c82f4956a3e3e97e35395d84
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/vdpa/vdpa_user/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> drivers/vdpa/vdpa_user/vduse_dev.c:1792:23: error: incompatible function pointer types assigning to 'char *(*)(const struct device *, umode_t *)' (aka 'char *(*)(const struct device *, unsigned short *)') from 'char *(struct device *, umode_t *)' (aka 'char *(struct device *, unsigned short *)') [-Werror,-Wincompatible-function-pointer-types]
vduse_class->devnode = vduse_devnode;
^ ~~~~~~~~~~~~~
1 error generated.
vim +1792 drivers/vdpa/vdpa_user/vduse_dev.c
c8a6153b6c59d9 Xie Yongji 2021-08-31 1782
c8a6153b6c59d9 Xie Yongji 2021-08-31 1783 static int vduse_init(void)
c8a6153b6c59d9 Xie Yongji 2021-08-31 1784 {
c8a6153b6c59d9 Xie Yongji 2021-08-31 1785 int ret;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1786 struct device *dev;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1787
c8a6153b6c59d9 Xie Yongji 2021-08-31 1788 vduse_class = class_create(THIS_MODULE, "vduse");
c8a6153b6c59d9 Xie Yongji 2021-08-31 1789 if (IS_ERR(vduse_class))
c8a6153b6c59d9 Xie Yongji 2021-08-31 1790 return PTR_ERR(vduse_class);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1791
c8a6153b6c59d9 Xie Yongji 2021-08-31 @1792 vduse_class->devnode = vduse_devnode;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1793
c8a6153b6c59d9 Xie Yongji 2021-08-31 1794 ret = alloc_chrdev_region(&vduse_major, 0, VDUSE_DEV_MAX, "vduse");
c8a6153b6c59d9 Xie Yongji 2021-08-31 1795 if (ret)
c8a6153b6c59d9 Xie Yongji 2021-08-31 1796 goto err_chardev_region;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1797
c8a6153b6c59d9 Xie Yongji 2021-08-31 1798 /* /dev/vduse/control */
c8a6153b6c59d9 Xie Yongji 2021-08-31 1799 cdev_init(&vduse_ctrl_cdev, &vduse_ctrl_fops);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1800 vduse_ctrl_cdev.owner = THIS_MODULE;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1801 ret = cdev_add(&vduse_ctrl_cdev, vduse_major, 1);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1802 if (ret)
c8a6153b6c59d9 Xie Yongji 2021-08-31 1803 goto err_ctrl_cdev;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1804
c8a6153b6c59d9 Xie Yongji 2021-08-31 1805 dev = device_create(vduse_class, NULL, vduse_major, NULL, "control");
c8a6153b6c59d9 Xie Yongji 2021-08-31 1806 if (IS_ERR(dev)) {
c8a6153b6c59d9 Xie Yongji 2021-08-31 1807 ret = PTR_ERR(dev);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1808 goto err_device;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1809 }
c8a6153b6c59d9 Xie Yongji 2021-08-31 1810
c8a6153b6c59d9 Xie Yongji 2021-08-31 1811 /* /dev/vduse/$DEVICE */
c8a6153b6c59d9 Xie Yongji 2021-08-31 1812 cdev_init(&vduse_cdev, &vduse_dev_fops);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1813 vduse_cdev.owner = THIS_MODULE;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1814 ret = cdev_add(&vduse_cdev, MKDEV(MAJOR(vduse_major), 1),
c8a6153b6c59d9 Xie Yongji 2021-08-31 1815 VDUSE_DEV_MAX - 1);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1816 if (ret)
c8a6153b6c59d9 Xie Yongji 2021-08-31 1817 goto err_cdev;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1818
c8a6153b6c59d9 Xie Yongji 2021-08-31 1819 vduse_irq_wq = alloc_workqueue("vduse-irq",
c8a6153b6c59d9 Xie Yongji 2021-08-31 1820 WQ_HIGHPRI | WQ_SYSFS | WQ_UNBOUND, 0);
6243e3c78ace66 Dan Carpenter 2021-09-07 1821 if (!vduse_irq_wq) {
6243e3c78ace66 Dan Carpenter 2021-09-07 1822 ret = -ENOMEM;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1823 goto err_wq;
6243e3c78ace66 Dan Carpenter 2021-09-07 1824 }
c8a6153b6c59d9 Xie Yongji 2021-08-31 1825
c8a6153b6c59d9 Xie Yongji 2021-08-31 1826 ret = vduse_domain_init();
c8a6153b6c59d9 Xie Yongji 2021-08-31 1827 if (ret)
c8a6153b6c59d9 Xie Yongji 2021-08-31 1828 goto err_domain;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1829
c8a6153b6c59d9 Xie Yongji 2021-08-31 1830 ret = vduse_mgmtdev_init();
c8a6153b6c59d9 Xie Yongji 2021-08-31 1831 if (ret)
c8a6153b6c59d9 Xie Yongji 2021-08-31 1832 goto err_mgmtdev;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1833
c8a6153b6c59d9 Xie Yongji 2021-08-31 1834 return 0;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1835 err_mgmtdev:
c8a6153b6c59d9 Xie Yongji 2021-08-31 1836 vduse_domain_exit();
c8a6153b6c59d9 Xie Yongji 2021-08-31 1837 err_domain:
c8a6153b6c59d9 Xie Yongji 2021-08-31 1838 destroy_workqueue(vduse_irq_wq);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1839 err_wq:
c8a6153b6c59d9 Xie Yongji 2021-08-31 1840 cdev_del(&vduse_cdev);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1841 err_cdev:
c8a6153b6c59d9 Xie Yongji 2021-08-31 1842 device_destroy(vduse_class, vduse_major);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1843 err_device:
c8a6153b6c59d9 Xie Yongji 2021-08-31 1844 cdev_del(&vduse_ctrl_cdev);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1845 err_ctrl_cdev:
c8a6153b6c59d9 Xie Yongji 2021-08-31 1846 unregister_chrdev_region(vduse_major, VDUSE_DEV_MAX);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1847 err_chardev_region:
c8a6153b6c59d9 Xie Yongji 2021-08-31 1848 class_destroy(vduse_class);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1849 return ret;
c8a6153b6c59d9 Xie Yongji 2021-08-31 1850 }
c8a6153b6c59d9 Xie Yongji 2021-08-31 1851 module_init(vduse_init);
c8a6153b6c59d9 Xie Yongji 2021-08-31 1852
:::::: The code at line 1792 was first introduced by commit
:::::: c8a6153b6c59d95c0e091f053f6f180952ade91e vduse: Introduce VDUSE - vDPA Device in Userspace
:::::: TO: Xie Yongji <xieyongji@...edance.com>
:::::: CC: Michael S. Tsirkin <mst@...hat.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (151445 bytes)
Powered by blists - more mailing lists