[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209292145.IpKHcpr3-lkp@intel.com>
Date: Thu, 29 Sep 2022 21:04:09 +0800
From: kernel test robot <lkp@...el.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: kbuild-all@...ts.01.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [driver-core:kobject-const 11/14]
drivers/vdpa/vdpa_user/vduse_dev.c:1792:30: error: assignment to 'char *
(*)(const struct device *, umode_t *)' {aka 'char * (*)(const struct device
*, short unsigned int *)'} from incompatible pointer type 'char * (*)(struct
device *, umode_t *)' {aka 'c...
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git kobject-const
head: 4c12c0413887fb8f76e86ff52c9ef37992c93788
commit: f5d68da0e1475938c82f4956a3e3e97e35395d84 [11/14] driver core: make struct class.devnode() take a const *
config: s390-allmodconfig
compiler: s390-linux-gcc (GCC) 12.1.0
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=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 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: In function 'vduse_init':
>> drivers/vdpa/vdpa_user/vduse_dev.c:1792:30: error: assignment to 'char * (*)(const struct device *, umode_t *)' {aka 'char * (*)(const struct device *, short unsigned int *)'} from incompatible pointer type 'char * (*)(struct device *, umode_t *)' {aka 'char * (*)(struct device *, short unsigned int *)'} [-Werror=incompatible-pointer-types]
1792 | vduse_class->devnode = vduse_devnode;
| ^
cc1: some warnings being treated as errors
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" (119701 bytes)
Powered by blists - more mailing lists