aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-11-10 11:50:42 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-11-10 11:50:42 +1100
commit152d5c0376b47ce433f58bf9305c52fbe920ccaf (patch)
tree31f3fad0b34d51761ac646160ddc221fe6fb6f30 /hdata
parentbad57a47d22d83b3fe7aed0c635bee71b2bc42eb (diff)
downloadskiboot-152d5c0376b47ce433f58bf9305c52fbe920ccaf.zip
skiboot-152d5c0376b47ce433f58bf9305c52fbe920ccaf.tar.gz
skiboot-152d5c0376b47ce433f58bf9305c52fbe920ccaf.tar.bz2
sparse: fix beint16_t degrades to int in hdata/hdif.c
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>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/hdif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hdata/hdif.c b/hdata/hdif.c
index 916b4dd..25c0000 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;
}