[Skiboot] [PATCH] hdata/spira: be32_to_cpu() doesn't work on 8bits

Stewart Smith stewart at linux.vnet.ibm.com
Thu Sep 28 16:39:50 AEST 2017


Sparse warning:
hdata/spira.c:1458:41: warning: incorrect type in argument 1 (different base types) expected restricted beint32_t [usertype] be_val got unsigned char const [unsigned] [usertype] link_speed

Signed-off-by: Stewart Smith <stewart 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 07d172b30afe..a153fe0b104c 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -1455,7 +1455,7 @@ static void add_npu(struct dt_node *xscom, const struct HDIF_array_hdr *links,
 		if (size <= 0x24)
 			continue;
 
-		switch (be32_to_cpu(link->link_speed)) {
+		switch (link->link_speed) {
 			case 0: /* 20Gbps */
 				speed = 20000000000ul;
 				nvlink_speed = 0x3;
-- 
2.13.5



More information about the Skiboot mailing list