[driver-core:bus_type_removal 11/16] arch/powerpc/platforms/pseries/vio.c:1002:23: error: 'cmo_allocs_failed_show' undeclared here (not in a function)

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git bus_type_removal
head:   4fe33425a6308e00d6bbe641e66abd3e78f45c3a
commit: ded32ca684d535165ce291bf5cfb9d2f2eae1550 [11/16] powerpc: vio_cmo: use dev_groups and not dev_attrs for bus_type
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout ded32ca684d535165ce291bf5cfb9d2f2eae1550
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

   In file included from include/linux/kobject.h:21:0,
                    from include/linux/device.h:17,
                    from include/linux/node.h:17,
                    from include/linux/cpu.h:16,
                    from arch/powerpc/platforms/pseries/vio.c:17:
>> arch/powerpc/platforms/pseries/vio.c:1002:23: error: 'cmo_allocs_failed_show' undeclared here (not in a function)
    static DEVICE_ATTR_RW(cmo_allocs_failed);
                          ^
   include/linux/sysfs.h:103:10: note: in definition of macro '__ATTR'
     .show = _show,      \
             ^~~~~
   include/linux/device.h:586:45: note: in expansion of macro '__ATTR_RW'
     struct device_attribute dev_attr_##_name = __ATTR_RW(_name)
                                                ^~~~~~~~~
   arch/powerpc/platforms/pseries/vio.c:1002:8: note: in expansion of macro 'DEVICE_ATTR_RW'
    static DEVICE_ATTR_RW(cmo_allocs_failed);
           ^~~~~~~~~~~~~~
>> arch/powerpc/platforms/pseries/vio.c:1019:16: error: conflicting types for 'cmo_entitled_show'
    static ssize_t cmo_##name##_show(struct bus_type *bt, char *buf)        \
                   ^
   arch/powerpc/platforms/pseries/vio.c:1033:1: note: in expansion of macro 'viobus_cmo_rd_attr'
    viobus_cmo_rd_attr(entitled);
    ^~~~~~~~~~~~~~~~~~
   arch/powerpc/platforms/pseries/vio.c:951:16: note: previous definition of 'cmo_entitled_show' was here
    static ssize_t cmo_##name##_show(struct device *dev,                    \
                   ^
   arch/powerpc/platforms/pseries/vio.c:989:1: note: in expansion of macro 'viodev_cmo_rd_attr'
    viodev_cmo_rd_attr(entitled);
    ^~~~~~~~~~~~~~~~~~
>> arch/powerpc/platforms/pseries/vio.c:1019:16: error: conflicting types for 'cmo_desired_show'
    static ssize_t cmo_##name##_show(struct bus_type *bt, char *buf)        \
                   ^
   arch/powerpc/platforms/pseries/vio.c:1036:1: note: in expansion of macro 'viobus_cmo_rd_attr'
    viobus_cmo_rd_attr(desired);
    ^~~~~~~~~~~~~~~~~~
   arch/powerpc/platforms/pseries/vio.c:951:16: note: previous definition of 'cmo_desired_show' was here
    static ssize_t cmo_##name##_show(struct device *dev,                    \
                   ^
   arch/powerpc/platforms/pseries/vio.c:988:1: note: in expansion of macro 'viodev_cmo_rd_attr'
    viodev_cmo_rd_attr(desired);
    ^~~~~~~~~~~~~~~~~~
   In file included from include/linux/node.h:17:0,
                    from include/linux/cpu.h:16,
                    from arch/powerpc/platforms/pseries/vio.c:17:
   include/linux/device.h:588:26: error: redefinition of 'dev_attr_name'
     struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
                             ^
   arch/powerpc/platforms/pseries/vio.c:1547:8: note: in expansion of macro 'DEVICE_ATTR_RO'
    static DEVICE_ATTR_RO(name);
           ^~~~~~~~~~~~~~
   include/linux/device.h:588:26: note: previous definition of 'dev_attr_name' was here
     struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
                             ^
   arch/powerpc/platforms/pseries/vio.c:996:8: note: in expansion of macro 'DEVICE_ATTR_RO'
    static DEVICE_ATTR_RO(name);
           ^~~~~~~~~~~~~~
   include/linux/device.h:588:26: error: redefinition of 'dev_attr_devspec'
     struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
                             ^
   arch/powerpc/platforms/pseries/vio.c:1556:8: note: in expansion of macro 'DEVICE_ATTR_RO'
    static DEVICE_ATTR_RO(devspec);
           ^~~~~~~~~~~~~~
   include/linux/device.h:588:26: note: previous definition of 'dev_attr_devspec' was here
     struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
                             ^
   arch/powerpc/platforms/pseries/vio.c:997:8: note: in expansion of macro 'DEVICE_ATTR_RO'
    static DEVICE_ATTR_RO(devspec);
           ^~~~~~~~~~~~~~
   include/linux/device.h:588:26: error: redefinition of 'dev_attr_modalias'
     struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
                             ^
   arch/powerpc/platforms/pseries/vio.c:1578:8: note: in expansion of macro 'DEVICE_ATTR_RO'
    static DEVICE_ATTR_RO(modalias);
           ^~~~~~~~~~~~~~
   include/linux/device.h:588:26: note: previous definition of 'dev_attr_modalias' was here
     struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
                             ^
   arch/powerpc/platforms/pseries/vio.c:998:8: note: in expansion of macro 'DEVICE_ATTR_RO'
    static DEVICE_ATTR_RO(modalias);
           ^~~~~~~~~~~~~~
   arch/powerpc/platforms/pseries/vio.c:1586:26: error: conflicting types for 'vio_dev_attrs'
    static struct attribute *vio_dev_attrs[] = {
                             ^~~~~~~~~~~~~
   arch/powerpc/platforms/pseries/vio.c:1580:32: note: previous definition of 'vio_dev_attrs' was here
    static struct device_attribute vio_dev_attrs[] = {
                                   ^~~~~~~~~~~~~
   arch/powerpc/platforms/pseries/vio.c:1580:32: error: 'vio_dev_attrs' defined but not used [-Werror=unused-variable]
>> arch/powerpc/platforms/pseries/vio.c:958:16: error: 'viodev_cmo_allocs_failed_show' defined but not used [-Werror=unused-function]
    static ssize_t viodev_cmo_allocs_failed_show(struct device *dev,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors

vim +/cmo_allocs_failed_show +1002 arch/powerpc/platforms/pseries/vio.c

   952	                                        struct device_attribute *attr,  \
   953	                                         char *buf)                     \
   954	{                                                                       \
   955		return sprintf(buf, "%lu\n", to_vio_dev(dev)->cmo.name);        \
   956	}
   957	
 > 958	static ssize_t viodev_cmo_allocs_failed_show(struct device *dev,
   959			struct device_attribute *attr, char *buf)
   960	{
   961		struct vio_dev *viodev = to_vio_dev(dev);
   962		return sprintf(buf, "%d\n", atomic_read(&viodev->cmo.allocs_failed));
   963	}
   964	
   965	static ssize_t cmo_allocs_failed_store(struct device *dev,
   966			struct device_attribute *attr, const char *buf, size_t count)
   967	{
   968		struct vio_dev *viodev = to_vio_dev(dev);
   969		atomic_set(&viodev->cmo.allocs_failed, 0);
   970		return count;
   971	}
   972	
   973	static ssize_t cmo_desired_store(struct device *dev,
   974			struct device_attribute *attr, const char *buf, size_t count)
   975	{
   976		struct vio_dev *viodev = to_vio_dev(dev);
   977		size_t new_desired;
   978		int ret;
   979	
   980		ret = kstrtoul(buf, 10, &new_desired);
   981		if (ret)
   982			return ret;
   983	
   984		vio_cmo_set_dev_desired(viodev, new_desired);
   985		return count;
   986	}
   987	
   988	viodev_cmo_rd_attr(desired);
   989	viodev_cmo_rd_attr(entitled);
   990	viodev_cmo_rd_attr(allocated);
   991	
   992	static ssize_t name_show(struct device *, struct device_attribute *, char *);
   993	static ssize_t devspec_show(struct device *, struct device_attribute *, char *);
   994	static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
   995				     char *buf);
   996	static DEVICE_ATTR_RO(name);
   997	static DEVICE_ATTR_RO(devspec);
   998	static DEVICE_ATTR_RO(modalias);
   999	static DEVICE_ATTR_RO(cmo_entitled);
  1000	static DEVICE_ATTR_RO(cmo_allocated);
  1001	static DEVICE_ATTR_RW(cmo_desired);
> 1002	static DEVICE_ATTR_RW(cmo_allocs_failed);
  1003	
  1004	static struct attribute *vio_cmo_dev_attrs[] = {
  1005		&dev_attr_name.attr,
  1006		&dev_attr_devspec.attr,
  1007		&dev_attr_modalias.attr,
  1008		&dev_attr_cmo_entitled.attr,
  1009		&dev_attr_cmo_allocated.attr,
  1010		&dev_attr_cmo_desired.attr,
  1011		&dev_attr_cmo_allocs_failed.attr,
  1012		NULL,
  1013	};
  1014	ATTRIBUTE_GROUPS(vio_cmo_dev);
  1015	
  1016	/* sysfs bus functions and data structures for CMO */
  1017	
  1018	#define viobus_cmo_rd_attr(name)                                        \
> 1019	static ssize_t cmo_##name##_show(struct bus_type *bt, char *buf)        \
  1020	{                                                                       \
  1021		return sprintf(buf, "%lu\n", vio_cmo.name);                     \
  1022	}                                                                       \
  1023	static BUS_ATTR_RO(cmo_##name)
  1024	
  1025	#define viobus_cmo_pool_rd_attr(name, var)                              \
  1026	static ssize_t                                                          \
  1027	cmo_##name##_##var##_show(struct bus_type *bt, char *buf)               \
  1028	{                                                                       \
  1029		return sprintf(buf, "%lu\n", vio_cmo.name.var);                 \
  1030	}                                                                       \
  1031	static BUS_ATTR_RO(cmo_##name##_##var)
  1032	
> 1033	viobus_cmo_rd_attr(entitled);
  1034	viobus_cmo_rd_attr(spare);
  1035	viobus_cmo_rd_attr(min);
  1036	viobus_cmo_rd_attr(desired);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux