[Skiboot] [PATCH] hdat_to_dt: hash_prop the same on all platforms

Stewart Smith stewart at linux.ibm.com
Mon Apr 30 16:13:16 AEST 2018


Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 hdata/test/hdata_to_dt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hdata/test/hdata_to_dt.c b/hdata/test/hdata_to_dt.c
index f7ed65e66717..8c61b4f62a48 100644
--- a/hdata/test/hdata_to_dt.c
+++ b/hdata/test/hdata_to_dt.c
@@ -193,7 +193,7 @@ static u32 hash_prop(const struct dt_property *p)
 
 	/* a stupid checksum */
 	for (i = 0; i < p->len; i++)
-		hash += ((p->prop[i] & ~0x10) + 1) * i;
+		hash += (((signed char)p->prop[i] & ~0x10) + 1) * i;
 
 	return hash;
 }
-- 
2.14.3



More information about the Skiboot mailing list