Commit 095e86c8 authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman

staging: wfx: fix cast operator

Sparse detects that le16_to_cpup() expects a __le16 * as argument.

Change the cast operator to be compliant with sparse.
Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200512150414.267198-4-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1d572139
...@@ -70,7 +70,7 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) ...@@ -70,7 +70,7 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf)
if (wfx_data_read(wdev, skb->data, alloc_len)) if (wfx_data_read(wdev, skb->data, alloc_len))
goto err; goto err;
piggyback = le16_to_cpup((u16 *)(skb->data + alloc_len - 2)); piggyback = le16_to_cpup((__le16 *)(skb->data + alloc_len - 2));
_trace_piggyback(piggyback, false); _trace_piggyback(piggyback, false);
hif = (struct hif_msg *)skb->data; hif = (struct hif_msg *)skb->data;
......
...@@ -184,7 +184,7 @@ DECLARE_EVENT_CLASS(hif_data, ...@@ -184,7 +184,7 @@ DECLARE_EVENT_CLASS(hif_data,
if (!is_recv && if (!is_recv &&
(__entry->msg_id == HIF_REQ_ID_READ_MIB || (__entry->msg_id == HIF_REQ_ID_READ_MIB ||
__entry->msg_id == HIF_REQ_ID_WRITE_MIB)) { __entry->msg_id == HIF_REQ_ID_WRITE_MIB)) {
__entry->mib = le16_to_cpup((u16 *) hif->body); __entry->mib = le16_to_cpup((__le16 *)hif->body);
header_len = 4; header_len = 4;
} else { } else {
__entry->mib = -1; __entry->mib = -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment