Commit 63764c7f authored by Ivan Safonov's avatar Ivan Safonov Committed by Greg Kroah-Hartman

staging:r8188eu: change type of the precv_buf member of recv_priv structure

To avoid unnecessary typecast.
To use compiler type checking.
Signed-off-by: default avatarIvan Safonov <insafonov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aaa27e8c
...@@ -46,10 +46,10 @@ int rtw_hal_init_recv_priv(struct adapter *padapter) ...@@ -46,10 +46,10 @@ int rtw_hal_init_recv_priv(struct adapter *padapter)
goto exit; goto exit;
} }
precvpriv->precv_buf = precvpriv->pallocated_recv_buf; precvpriv->precv_buf = (struct recv_buf *)precvpriv->pallocated_recv_buf;
precvbuf = (struct recv_buf *)precvpriv->precv_buf; precvbuf = precvpriv->precv_buf;
for (i = 0; i < NR_RECVBUFF; i++) { for (i = 0; i < NR_RECVBUFF; i++) {
res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf); res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf);
...@@ -86,7 +86,7 @@ void rtw_hal_free_recv_priv(struct adapter *padapter) ...@@ -86,7 +86,7 @@ void rtw_hal_free_recv_priv(struct adapter *padapter)
struct recv_buf *precvbuf; struct recv_buf *precvbuf;
struct recv_priv *precvpriv = &padapter->recvpriv; struct recv_priv *precvpriv = &padapter->recvpriv;
precvbuf = (struct recv_buf *)precvpriv->precv_buf; precvbuf = precvpriv->precv_buf;
for (i = 0; i < NR_RECVBUFF; i++) { for (i = 0; i < NR_RECVBUFF; i++) {
usb_free_urb(precvbuf->purb); usb_free_urb(precvbuf->purb);
......
...@@ -987,7 +987,7 @@ u32 rtw_hal_inirp_init(struct adapter *Adapter) ...@@ -987,7 +987,7 @@ u32 rtw_hal_inirp_init(struct adapter *Adapter)
("===> usb_inirp_init\n")); ("===> usb_inirp_init\n"));
/* issue Rx irp to receive data */ /* issue Rx irp to receive data */
precvbuf = (struct recv_buf *)precvpriv->precv_buf; precvbuf = precvpriv->precv_buf;
for (i = 0; i < NR_RECVBUFF; i++) { for (i = 0; i < NR_RECVBUFF; i++) {
if (usb_read_port(Adapter, RECV_BULK_IN_ADDR, precvbuf) == false) { if (usb_read_port(Adapter, RECV_BULK_IN_ADDR, precvbuf) == false) {
RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("usb_rx_init: usb_read_port error\n")); RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("usb_rx_init: usb_read_port error\n"));
......
...@@ -181,7 +181,7 @@ struct recv_priv { ...@@ -181,7 +181,7 @@ struct recv_priv {
struct sk_buff_head free_recv_skb_queue; struct sk_buff_head free_recv_skb_queue;
struct sk_buff_head rx_skb_queue; struct sk_buff_head rx_skb_queue;
u8 *pallocated_recv_buf; u8 *pallocated_recv_buf;
u8 *precv_buf; /* 4 alignment */ struct recv_buf *precv_buf; /* 4 alignment */
struct __queue free_recv_buf_queue; struct __queue free_recv_buf_queue;
/* For display the phy informatiom */ /* For display the phy informatiom */
u8 is_signal_dbg; /* for debug */ u8 is_signal_dbg; /* for debug */
......
...@@ -521,7 +521,7 @@ void rtw_hal_inirp_deinit(struct adapter *padapter) ...@@ -521,7 +521,7 @@ void rtw_hal_inirp_deinit(struct adapter *padapter)
int i; int i;
struct recv_buf *precvbuf; struct recv_buf *precvbuf;
precvbuf = (struct recv_buf *)padapter->recvpriv.precv_buf; precvbuf = padapter->recvpriv.precv_buf;
DBG_88E("%s\n", __func__); DBG_88E("%s\n", __func__);
......
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