<p>Nico Huber has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/26291">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">device/device_simple: Warn about dev_find_slot()<br><br>Using the secondary bus number to identify devices in the static device-<br>tree is unreliable as they are all zero. Alas, dev_find_slot() is used<br>a lot in early device code at the moment. So warn users of this imple-<br>mentation.<br><br>Change-Id: I312d3506fc2d6ce8cc28cf9557b21d1c1cbd2d12<br>Signed-off-by: Nico Huber <nico.huber@secunet.com><br>---<br>M src/device/device_simple.c<br>1 file changed, 7 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/26291/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/device/device_simple.c b/src/device/device_simple.c</span><br><span>index 4a5faf6..e6a6e8f 100644</span><br><span>--- a/src/device/device_simple.c</span><br><span>+++ b/src/device/device_simple.c</span><br><span>@@ -18,6 +18,7 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <console/console.h></span><br><span> #include <device/device.h></span><br><span> #include <device/path.h></span><br><span> #include <device/pci.h></span><br><span>@@ -38,6 +39,12 @@</span><br><span> {</span><br><span>        DEVTREE_CONST struct device *dev, *result;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+        printk(BIOS_WARNING,</span><br><span style="color: hsl(120, 100%, 40%);">+          "WARNING: Using the simple device version of %s() "</span><br><span style="color: hsl(120, 100%, 40%);">+         "is considered\ndangerous. Secondary bus numbers are not "</span><br><span style="color: hsl(120, 100%, 40%);">+          "available, yet. Please update the\n code of your platform.\n",</span><br><span style="color: hsl(120, 100%, 40%);">+             __func__);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>         result = 0;</span><br><span>  for (dev = all_devices; dev; dev = dev->next) {</span><br><span>           if ((dev->path.type == DEVICE_PATH_PCI) &&</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/26291">change 26291</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/26291"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I312d3506fc2d6ce8cc28cf9557b21d1c1cbd2d12 </div>
<div style="display:none"> Gerrit-Change-Number: 26291 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Nico Huber <nico.h@gmx.de> </div>