mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 15:15:47 +00:00
staging: wlan-ng: hfa384x: fix several type issues.
There were several in-place conversions of 16 and 32-bit data, which caused sparse to detect them. Changed them to the in situ versions, such as: le16_to_cpu -> le16_to_cpus Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
675b62d288
commit
126ef7760b
1 changed files with 8 additions and 10 deletions
|
@ -1840,15 +1840,15 @@ int hfa384x_drvr_flashdl_enable(struct hfa384x *hw)
|
||||||
if (result)
|
if (result)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page);
|
le16_to_cpus(&hw->bufinfo.page);
|
||||||
hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset);
|
le16_to_cpus(&hw->bufinfo.offset);
|
||||||
hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len);
|
le16_to_cpus(&hw->bufinfo.len);
|
||||||
result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME,
|
result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME,
|
||||||
&hw->dltimeout);
|
&hw->dltimeout);
|
||||||
if (result)
|
if (result)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
hw->dltimeout = le16_to_cpu(hw->dltimeout);
|
le16_to_cpus(&hw->dltimeout);
|
||||||
|
|
||||||
pr_debug("flashdl_enable\n");
|
pr_debug("flashdl_enable\n");
|
||||||
|
|
||||||
|
@ -2644,8 +2644,7 @@ int hfa384x_drvr_txframe(struct hfa384x *hw, struct sk_buff *skb,
|
||||||
HFA384x_TX_MACPORT_SET(0) | HFA384x_TX_STRUCTYPE_SET(1) |
|
HFA384x_TX_MACPORT_SET(0) | HFA384x_TX_STRUCTYPE_SET(1) |
|
||||||
HFA384x_TX_TXEX_SET(0) | HFA384x_TX_TXOK_SET(0);
|
HFA384x_TX_TXEX_SET(0) | HFA384x_TX_TXOK_SET(0);
|
||||||
#endif
|
#endif
|
||||||
hw->txbuff.txfrm.desc.tx_control =
|
cpu_to_le16s(&hw->txbuff.txfrm.desc.tx_control);
|
||||||
cpu_to_le16(hw->txbuff.txfrm.desc.tx_control);
|
|
||||||
|
|
||||||
/* copy the header over to the txdesc */
|
/* copy the header over to the txdesc */
|
||||||
memcpy(&hw->txbuff.txfrm.desc.frame_control, p80211_hdr,
|
memcpy(&hw->txbuff.txfrm.desc.frame_control, p80211_hdr,
|
||||||
|
@ -3380,8 +3379,8 @@ static void hfa384x_usbin_rx(struct wlandevice *wlandev, struct sk_buff *skb)
|
||||||
u16 fc;
|
u16 fc;
|
||||||
|
|
||||||
/* Byte order convert once up front. */
|
/* Byte order convert once up front. */
|
||||||
usbin->rxfrm.desc.status = le16_to_cpu(usbin->rxfrm.desc.status);
|
le16_to_cpus(&usbin->rxfrm.desc.status);
|
||||||
usbin->rxfrm.desc.time = le32_to_cpu(usbin->rxfrm.desc.time);
|
le32_to_cpus(&usbin->rxfrm.desc.time);
|
||||||
|
|
||||||
/* Now handle frame based on port# */
|
/* Now handle frame based on port# */
|
||||||
switch (HFA384x_RXSTATUS_MACPORT_GET(usbin->rxfrm.desc.status)) {
|
switch (HFA384x_RXSTATUS_MACPORT_GET(usbin->rxfrm.desc.status)) {
|
||||||
|
@ -3576,8 +3575,7 @@ static void hfa384x_int_rxmonitor(struct wlandevice *wlandev,
|
||||||
static void hfa384x_usbin_info(struct wlandevice *wlandev,
|
static void hfa384x_usbin_info(struct wlandevice *wlandev,
|
||||||
union hfa384x_usbin *usbin)
|
union hfa384x_usbin *usbin)
|
||||||
{
|
{
|
||||||
usbin->infofrm.info.framelen =
|
le16_to_cpus(&usbin->infofrm.info.framelen);
|
||||||
le16_to_cpu(usbin->infofrm.info.framelen);
|
|
||||||
prism2sta_ev_info(wlandev, &usbin->infofrm.info);
|
prism2sta_ev_info(wlandev, &usbin->infofrm.info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue