Commit 0df9edb3 authored by Larry Finger's avatar Larry Finger Committed by Kalle Valo

rtlwifi: Fix endian issue in ps.c

Sparse reports the following endian issues:

  CHECK   drivers/net/wireless/realtek/rtlwifi/ps.c
drivers/net/wireless/realtek/rtlwifi/ps.c:772:42: warning: restricted __le32 degrades to integer
drivers/net/wireless/realtek/rtlwifi/ps.c:772:42: warning: cast to restricted __le32
drivers/net/wireless/realtek/rtlwifi/ps.c:775:42: warning: restricted __le32 degrades to integer
drivers/net/wireless/realtek/rtlwifi/ps.c:775:42: warning: cast to restricted __le32
drivers/net/wireless/realtek/rtlwifi/ps.c:778:42: warning: restricted __le32 degrades to integer
drivers/net/wireless/realtek/rtlwifi/ps.c:778:42: warning: cast to restricted __le32
drivers/net/wireless/realtek/rtlwifi/ps.c:867:42: warning: restricted __le32 degrades to integer
drivers/net/wireless/realtek/rtlwifi/ps.c:867:42: warning: cast to restricted __le32
drivers/net/wireless/realtek/rtlwifi/ps.c:870:42: warning: restricted __le32 degrades to integer
drivers/net/wireless/realtek/rtlwifi/ps.c:870:42: warning: cast to restricted __le32
drivers/net/wireless/realtek/rtlwifi/ps.c:873:42: warning: restricted __le32 degrades to integer
drivers/net/wireless/realtek/rtlwifi/ps.c:873:42: warning: cast to restricted __le32
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200604005733.7905-2-Larry.Finger@lwfinger.net
parent 8bd4147c
......@@ -769,13 +769,13 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,
*(u8 *)(ie + index);
index += 1;
p2pinfo->noa_duration[i] =
le32_to_cpu(*(__le32 *)ie + index);
le32_to_cpu(*(__le32 *)(ie + index));
index += 4;
p2pinfo->noa_interval[i] =
le32_to_cpu(*(__le32 *)ie + index);
le32_to_cpu(*(__le32 *)(ie + index));
index += 4;
p2pinfo->noa_start_time[i] =
le32_to_cpu(*(__le32 *)ie + index);
le32_to_cpu(*(__le32 *)(ie + index));
index += 4;
}
......@@ -864,13 +864,13 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data,
*(u8 *)(ie + index);
index += 1;
p2pinfo->noa_duration[i] =
le32_to_cpu(*(__le32 *)ie + index);
le32_to_cpu(*(__le32 *)(ie + index));
index += 4;
p2pinfo->noa_interval[i] =
le32_to_cpu(*(__le32 *)ie + index);
le32_to_cpu(*(__le32 *)(ie + index));
index += 4;
p2pinfo->noa_start_time[i] =
le32_to_cpu(*(__le32 *)ie + index);
le32_to_cpu(*(__le32 *)(ie + index));
index += 4;
}
......
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