[Skiboot] [trivial PATCH] hdata: Fix sparse warning in add_ecid_data()
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Thu Sep 28 16:54:48 AEST 2017
warning:
hdata/spira.c:433:33: warning: restricted beint64_t degrades to integer
Reported-by: Stewart Smith <stewart at linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
hdata/spira.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hdata/spira.c b/hdata/spira.c
index 7e88348..f3b0f69 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -430,7 +430,7 @@ static void add_ecid_data(const struct HDIF_common_hdr *hdr,
* each containing a code).
*/
for (i = 0; i < 10; i++) {
- tmp = (u8)((ecid->low >> (i * 6)) & 0x3f);
+ tmp = (u8)((be64_to_cpu(ecid->low) >> (i * 6)) & 0x3f);
if (tmp <= 9)
wafer_id[9 - i] = tmp + '0';
else if (tmp >= 0xA && tmp <= 0x23)
--
2.9.3
More information about the Skiboot
mailing list