diff mbox series

hdat_to_dt: hash_prop the same on all platforms

Message ID 20180430061316.30644-1-stewart@linux.ibm.com
State Accepted
Headers show
Series hdat_to_dt: hash_prop the same on all platforms | expand

Commit Message

Stewart Smith April 30, 2018, 6:13 a.m. UTC
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
---
 hdata/test/hdata_to_dt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stewart Smith April 30, 2018, 7:42 a.m. UTC | #1
Stewart Smith <stewart@linux.ibm.com> writes:
> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
> ---
>  hdata/test/hdata_to_dt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Merged to master as of c90fb6cd796e0ca8c2fcffef8d1f8a8e6245b8ae
diff mbox series

Patch

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;
 }