[PATCH] staging: ks7010: use le16_to_cpu() to access __le16 field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Richard Porter <dick@xxxxxxx>

Fixes sparse warning:
drivers/staging/ks7010/ks_hostif.c:959:24: warning: restricted __le16
degrades to integer

Signed-off-by: Richard Porter <dick@xxxxxxx>
---
Every access of struct association_request_t.req_ies_size is wrapped with
le16_to_cpu(), except the one at ks_hostif.c:959.

 drivers/staging/ks7010/ks_hostif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index 79634be..697347b 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;
--
2.7.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux