From: Richard Porter Date: Sun, 4 Jun 2017 10:10:12 +0000 (+0100) Subject: staging: ks7010: use le16_to_cpu() to access __le16 field X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f98c6e67ffd1961884e70023a33e81730cd7fcb;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: ks7010: use le16_to_cpu() to access __le16 field Fixes sparse warning: drivers/staging/ks7010/ks_hostif.c:959:24: warning: restricted __le16 degrades to integer Signed-off-by: Richard Porter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 79634be1b873..697347bb8760 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -956,7 +956,7 @@ void hostif_associate_indication(struct ks_wlan_private *priv) wrqu.data.length += sizeof(associnfo_leader1) - 1; pbuf += sizeof(associnfo_leader1) - 1; - pb += assoc_req->req_ies_size; + pb += le16_to_cpu(assoc_req->req_ies_size); for (i = 0; i < le16_to_cpu(assoc_resp->resp_ies_size); i++) pbuf += sprintf(pbuf, "%02x", *(pb + i)); wrqu.data.length += (le16_to_cpu(assoc_resp->resp_ies_size)) * 2;