|
|
99c779 |
From 20bd6fc0673eeba3e3419f152a66c264ee4335ef Mon Sep 17 00:00:00 2001
|
|
|
99c779 |
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
|
99c779 |
Date: Mon, 28 Nov 2016 15:01:15 +0530
|
|
|
99c779 |
Subject: [PATCH 33/43] devtree: Code cleanup
|
|
|
99c779 |
|
|
|
99c779 |
Make function as static function, use hw:strip() for reading
|
|
|
99c779 |
strings from device tree property.
|
|
|
99c779 |
|
|
|
99c779 |
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
|
99c779 |
---
|
|
|
99c779 |
src/core/device-tree.cc | 6 +++---
|
|
|
99c779 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
99c779 |
|
|
|
99c779 |
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
|
|
|
99c779 |
index 21bb6d9..05db9f3 100644
|
|
|
99c779 |
--- a/src/core/device-tree.cc
|
|
|
99c779 |
+++ b/src/core/device-tree.cc
|
|
|
99c779 |
@@ -752,7 +752,7 @@ static void scan_devtree_cpu_power(hwNode & core)
|
|
|
99c779 |
delete it->second;
|
|
|
99c779 |
}
|
|
|
99c779 |
|
|
|
99c779 |
-void add_memory_bank(string name, string path, hwNode & core)
|
|
|
99c779 |
+static void add_memory_bank(string name, string path, hwNode & core)
|
|
|
99c779 |
{
|
|
|
99c779 |
struct dirent **dirlist;
|
|
|
99c779 |
string product;
|
|
|
99c779 |
@@ -773,10 +773,10 @@ void add_memory_bank(string name, string path, hwNode & core)
|
|
|
99c779 |
if(exists("serial-number"))
|
|
|
99c779 |
bank.setSerial(hw::strip(get_string("serial-number")));
|
|
|
99c779 |
|
|
|
99c779 |
- product = get_string("part-number");
|
|
|
99c779 |
+ product = hw::strip(get_string("part-number"));
|
|
|
99c779 |
if(exists("fru-number"))
|
|
|
99c779 |
{
|
|
|
99c779 |
- product += " FRU# " + get_string("fru-number");
|
|
|
99c779 |
+ product += " FRU# " + hw::strip(get_string("fru-number"));
|
|
|
99c779 |
}
|
|
|
99c779 |
if(product != "")
|
|
|
99c779 |
bank.setProduct(hw::strip(product));
|
|
|
99c779 |
--
|
|
|
99c779 |
2.10.2
|
|
|
99c779 |
|