diff mbox

[25/36] sparse: fix beint16_t degrades to int in hdata/hdif.c

Message ID 1447129110-21600-26-git-send-email-stewart@linux.vnet.ibm.com
State Accepted
Headers show

Commit Message

Stewart Smith Nov. 10, 2015, 4:18 a.m. UTC
Do the comparison in host endian rather than big endian to silence sparse

hdata/hdif.c:25:16: warning: restricted beint16_t degrades to integer

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 hdata/hdif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/hdata/hdif.c b/hdata/hdif.c
index 916b4ddaceb5..25c00008138f 100644
--- a/hdata/hdif.c
+++ b/hdata/hdif.c
@@ -22,7 +22,7 @@  const void *HDIF_get_idata(const struct HDIF_common_hdr *hdif, unsigned int di,
 	const struct HDIF_common_hdr *hdr = hdif;
 	const struct HDIF_idata_ptr *iptr;
 
-	if (hdr->d1f0 != BE16_TO_CPU(0xd1f0)) {
+	if (be16_to_cpu(hdr->d1f0) != 0xd1f0) {
 		prerror("HDIF: Bad header format !\n");
 		return NULL;
 	}