DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [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
@ 2019-11-03 18:15 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-11-03 18:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5162 bytes --]

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@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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 7207 bytes --]

[-- Attachment #3: Type: text/plain, Size: 169 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-03 18:15 [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

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git