[coreboot-gerrit] Change in coreboot[master]: arch/x86/smbios: smbios walk on enabled devices

Naresh Solanki (Code Review) gerrit at coreboot.org
Tue Jun 5 15:33:55 CEST 2018


Naresh Solanki has uploaded this change for review. ( https://review.coreboot.org/26864


Change subject: arch/x86/smbios: smbios walk on enabled devices
......................................................................

arch/x86/smbios: smbios walk on enabled devices

Check whether device is enabled before calling smbios ops.

BUG=None
BRANCH=None
TEST=Build & boot Soraka.

Change-Id: I79681c10679e1de3a2d177503f29239968d0c157
Signed-off-by: Naresh G Solanki <naresh.solanki at intel.com>
---
M src/arch/x86/smbios.c
1 file changed, 4 insertions(+), 3 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/26864/1

diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 25a41b5..1a3bb22 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -675,10 +675,11 @@
 	int len = 0;
 
 	for (dev = tree; dev; dev = dev->next) {
-		printk(BIOS_INFO, "%s (%s)\n", dev_path(dev), dev_name(dev));
-
-		if (dev->ops && dev->ops->get_smbios_data)
+		if (dev->enabled && dev->ops && dev->ops->get_smbios_data) {
+			printk(BIOS_INFO, "%s (%s)\n", dev_path(dev), \
+				dev_name(dev));
 			len += dev->ops->get_smbios_data(dev, handle, current);
+		}
 	}
 	return len;
 }

-- 
To view, visit https://review.coreboot.org/26864
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I79681c10679e1de3a2d177503f29239968d0c157
Gerrit-Change-Number: 26864
Gerrit-PatchSet: 1
Gerrit-Owner: Naresh Solanki <naresh.solanki at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180605/a3935547/attachment.html>


More information about the coreboot-gerrit mailing list