Commit bd37c43c authored by Bhaktipriya Shridhar's avatar Bhaktipriya Shridhar Committed by Greg Kroah-Hartman

staging: rtl8188eu: core: Remove casts of pointer to same type

Casting a pointer to a pointer of the same type is unnecessary, so remove
these unnecessary casts.

This was done with Coccinelle:

@@
type T;
T *ptr;
@@
- (T *)ptr
+ ptr
Signed-off-by: default avatarBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3edd192b
...@@ -141,7 +141,7 @@ struct recv_frame *_rtw_alloc_recvframe(struct __queue *pfree_recv_queue) ...@@ -141,7 +141,7 @@ struct recv_frame *_rtw_alloc_recvframe(struct __queue *pfree_recv_queue)
} }
} }
return (struct recv_frame *)hdr; return hdr;
} }
struct recv_frame *rtw_alloc_recvframe(struct __queue *pfree_recv_queue) struct recv_frame *rtw_alloc_recvframe(struct __queue *pfree_recv_queue)
...@@ -240,7 +240,7 @@ void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfre ...@@ -240,7 +240,7 @@ void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfre
plist = plist->next; plist = plist->next;
rtw_free_recvframe((struct recv_frame *)hdr, pfree_recv_queue); rtw_free_recvframe(hdr, pfree_recv_queue);
} }
spin_unlock(&pframequeue->lock); spin_unlock(&pframequeue->lock);
...@@ -1417,7 +1417,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter, ...@@ -1417,7 +1417,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
phead = get_list_head(defrag_q); phead = get_list_head(defrag_q);
plist = phead->next; plist = phead->next;
pfhdr = container_of(plist, struct recv_frame, list); pfhdr = container_of(plist, struct recv_frame, list);
prframe = (struct recv_frame *)pfhdr; prframe = pfhdr;
list_del_init(&(prframe->list)); list_del_init(&(prframe->list));
if (curfragnum != pfhdr->attrib.frag_num) { if (curfragnum != pfhdr->attrib.frag_num) {
...@@ -1437,7 +1437,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter, ...@@ -1437,7 +1437,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
while (phead != plist) { while (phead != plist) {
pnfhdr = container_of(plist, struct recv_frame, list); pnfhdr = container_of(plist, struct recv_frame, list);
pnextrframe = (struct recv_frame *)pnfhdr; pnextrframe = pnfhdr;
/* check the fragment sequence (2nd ~n fragment frame) */ /* check the fragment sequence (2nd ~n fragment frame) */
...@@ -1780,7 +1780,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor ...@@ -1780,7 +1780,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
/* Check if there is any packet need indicate. */ /* Check if there is any packet need indicate. */
while (!list_empty(phead)) { while (!list_empty(phead)) {
prhdr = container_of(plist, struct recv_frame, list); prhdr = container_of(plist, struct recv_frame, list);
prframe = (struct recv_frame *)prhdr; prframe = prhdr;
pattrib = &prframe->attrib; pattrib = &prframe->attrib;
if (!SN_LESS(preorder_ctrl->indicate_seq, pattrib->seq_num)) { if (!SN_LESS(preorder_ctrl->indicate_seq, pattrib->seq_num)) {
......
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