[driver-core:device_h_splitup 35/35] include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration

kbuild test robot lkp at intel.com
Sun Nov 3 18:15:05 UTC 2019


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git device_h_splitup
head:   8ac09706c581716b3ca938773ad29e50854fa674
commit: 8ac09706c581716b3ca938773ad29e50854fa674 [35/35] device.h: move 'struct class' stuff out to device/class.h
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout 8ac09706c581716b3ca938773ad29e50854fa674
        # save the attached .config to linux build tree
        make ARCH=i386 

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

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:29:0,
                    from drivers/base/component.c:11:
   include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
    bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
                                                                 ^~~~~~~~~~~~~
   In file included from include/linux/device.h:30:0,
                    from drivers/base/component.c:11:
>> include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
           const struct fwnode_handle *fwnode)
                        ^~~~~~~~~~~~~
--
   In file included from include/linux/device.h:29:0,
                    from drivers/base/devcon.c:9:
   include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
    bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
                                                                 ^~~~~~~~~~~~~
   In file included from include/linux/device.h:30:0,
                    from drivers/base/devcon.c:9:
>> include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
           const struct fwnode_handle *fwnode)
                        ^~~~~~~~~~~~~
   drivers/base/devcon.c: In function 'device_connection_fwnode_match':
   drivers/base/devcon.c:161:40: error: passing argument 2 of 'bus_find_device_by_fwnode' from incompatible pointer type [-Werror=incompatible-pointer-types]
      dev = bus_find_device_by_fwnode(bus, con->fwnode);
                                           ^~~
   In file included from include/linux/device.h:29:0,
                    from drivers/base/devcon.c:9:
   include/linux/device/bus.h:193:1: note: expected 'const struct fwnode_handle *' but argument is of type 'struct fwnode_handle *'
    bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
    ^~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from include/linux/device.h:29:0,
                    from drivers//base/devcon.c:9:
   include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
    bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
                                                                 ^~~~~~~~~~~~~
   In file included from include/linux/device.h:30:0,
                    from drivers//base/devcon.c:9:
>> include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
           const struct fwnode_handle *fwnode)
                        ^~~~~~~~~~~~~
   drivers//base/devcon.c: In function 'device_connection_fwnode_match':
   drivers//base/devcon.c:161:40: error: passing argument 2 of 'bus_find_device_by_fwnode' from incompatible pointer type [-Werror=incompatible-pointer-types]
      dev = bus_find_device_by_fwnode(bus, con->fwnode);
                                           ^~~
   In file included from include/linux/device.h:29:0,
                    from drivers//base/devcon.c:9:
   include/linux/device/bus.h:193:1: note: expected 'const struct fwnode_handle *' but argument is of type 'struct fwnode_handle *'
    bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
    ^~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +152 include/linux/device/class.h

   143	
   144	/**
   145	 * class_find_device_by_fwnode : device iterator for locating a particular device
   146	 * matching the fwnode.
   147	 * @class: class type
   148	 * @fwnode: fwnode of the device to match.
   149	 */
   150	static inline struct device *
   151	class_find_device_by_fwnode(struct class *class,
 > 152				    const struct fwnode_handle *fwnode)
   153	{
   154		return class_find_device(class, NULL, fwnode, device_match_fwnode);
   155	}
   156	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 7207 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20191104/f26d972b/attachment-0001.bin>


More information about the devel mailing list