All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 5090/5337] drivers//base/devcon.c:180:9: warning: array subscript is below array bounds
@ 2019-12-26  6:22 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-12-26  6:22 UTC (permalink / raw)
  To: Oleksandr Natalenko
  Cc: kbuild-all, Andrew Morton, Linux Memory Management List

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7ddd09fc4b745fb1d8942f95389583e08412e0cd
commit: 27fc2e84ab6df89e3c8f333701055af6704634c5 [5090/5337] init/Kconfig: enable -O3 for all arches
config: i386-randconfig-f001-20191226 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        git checkout 27fc2e84ab6df89e3c8f333701055af6704634c5
        # 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>

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.

All warnings (new ones prefixed by >>):

   drivers//base/devcon.c: In function 'device_connection_find':
>> drivers//base/devcon.c:180:9: warning: array subscript is below array bounds [-Warray-bounds]
      dev = bus_find_device_by_name(bus, NULL, con->endpoint[ep]);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers//base/devcon.c:180:9: warning: array subscript is below array bounds [-Warray-bounds]
      dev = bus_find_device_by_name(bus, NULL, con->endpoint[ep]);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +180 drivers//base/devcon.c

80e04837a40f6f Heikki Krogerus 2019-02-13  169  
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  170  /* This tries to find the device from the most common bus types by name. */
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  171  static void *generic_match(struct device_connection *con, int ep, void *data)
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  172  {
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  173  	struct bus_type *bus;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  174  	struct device *dev;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  175  
80e04837a40f6f Heikki Krogerus 2019-02-13  176  	if (con->fwnode)
80e04837a40f6f Heikki Krogerus 2019-02-13  177  		return device_connection_fwnode_match(con);
80e04837a40f6f Heikki Krogerus 2019-02-13  178  
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  179  	for (bus = generic_match_buses[0]; bus; bus++) {
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 @180  		dev = bus_find_device_by_name(bus, NULL, con->endpoint[ep]);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  181  		if (dev)
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  182  			return dev;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  183  	}
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  184  
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  185  	/*
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  186  	 * We only get called if a connection was found, tell the caller to
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  187  	 * wait for the other device to show up.
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  188  	 */
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  189  	return ERR_PTR(-EPROBE_DEFER);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  190  }
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  191  

:::::: The code at line 180 was first introduced by commit
:::::: f2d9b66d84f3ff5ea3aff111e6a403e04fa8bf37 drivers: base: Unified device connection lookup

:::::: TO: Heikki Krogerus <heikki.krogerus@linux.intel.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [linux-next:master 5090/5337] drivers//base/devcon.c:180:9: warning: array subscript is below array bounds
@ 2019-12-26  6:22 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-12-26  6:22 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7ddd09fc4b745fb1d8942f95389583e08412e0cd
commit: 27fc2e84ab6df89e3c8f333701055af6704634c5 [5090/5337] init/Kconfig: enable -O3 for all arches
config: i386-randconfig-f001-20191226 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        git checkout 27fc2e84ab6df89e3c8f333701055af6704634c5
        # 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>

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.

All warnings (new ones prefixed by >>):

   drivers//base/devcon.c: In function 'device_connection_find':
>> drivers//base/devcon.c:180:9: warning: array subscript is below array bounds [-Warray-bounds]
      dev = bus_find_device_by_name(bus, NULL, con->endpoint[ep]);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers//base/devcon.c:180:9: warning: array subscript is below array bounds [-Warray-bounds]
      dev = bus_find_device_by_name(bus, NULL, con->endpoint[ep]);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +180 drivers//base/devcon.c

80e04837a40f6f Heikki Krogerus 2019-02-13  169  
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  170  /* This tries to find the device from the most common bus types by name. */
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  171  static void *generic_match(struct device_connection *con, int ep, void *data)
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  172  {
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  173  	struct bus_type *bus;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  174  	struct device *dev;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  175  
80e04837a40f6f Heikki Krogerus 2019-02-13  176  	if (con->fwnode)
80e04837a40f6f Heikki Krogerus 2019-02-13  177  		return device_connection_fwnode_match(con);
80e04837a40f6f Heikki Krogerus 2019-02-13  178  
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  179  	for (bus = generic_match_buses[0]; bus; bus++) {
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 @180  		dev = bus_find_device_by_name(bus, NULL, con->endpoint[ep]);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  181  		if (dev)
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  182  			return dev;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  183  	}
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  184  
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  185  	/*
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  186  	 * We only get called if a connection was found, tell the caller to
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  187  	 * wait for the other device to show up.
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  188  	 */
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  189  	return ERR_PTR(-EPROBE_DEFER);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  190  }
f2d9b66d84f3ff Heikki Krogerus 2018-03-20  191  

:::::: The code at line 180 was first introduced by commit
:::::: f2d9b66d84f3ff5ea3aff111e6a403e04fa8bf37 drivers: base: Unified device connection lookup

:::::: TO: Heikki Krogerus <heikki.krogerus@linux.intel.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-26  6:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-26  6:22 [linux-next:master 5090/5337] drivers//base/devcon.c:180:9: warning: array subscript is below array bounds kbuild test robot
2019-12-26  6:22 ` kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.