staging: rtl8712: remove wrapper function list_insert_tail

list_insert_tail is just an inline wrapper around list_add_tail.  This
patch removes the wrapper and directly uses list_add_tail.

Signed-off-by: James A Shackleford <shack@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
James A Shackleford 2014-06-24 22:52:36 -04:00 коммит произвёл Greg Kroah-Hartman
Родитель 9672b1bd83
Коммит fdfbf7890d
9 изменённых файлов: 24 добавлений и 30 удалений

Просмотреть файл

@ -115,12 +115,6 @@ For the following list_xxx operations,
caller must guarantee the atomic context.
Otherwise, there will be racing condition.
*/
static inline void list_insert_tail(struct list_head *plist,
struct list_head *phead)
{
list_add_tail(plist, phead);
}
static inline u32 _down_sema(struct semaphore *sema)
{
if (down_interruptible(sema))

Просмотреть файл

@ -73,7 +73,7 @@ int r8712_init_recv_priv(struct recv_priv *precvpriv, struct _adapter *padapter)
break;
precvbuf->ref_cnt = 0;
precvbuf->adapter = padapter;
list_insert_tail(&precvbuf->list,
list_add_tail(&precvbuf->list,
&(precvpriv->free_recv_buf_queue.queue));
precvbuf++;
}
@ -146,7 +146,7 @@ int r8712_free_recvframe(union recv_frame *precvframe,
}
spin_lock_irqsave(&pfree_recv_queue->lock, irqL);
list_delete(&(precvframe->u.hdr.list));
list_insert_tail(&(precvframe->u.hdr.list),
list_add_tail(&(precvframe->u.hdr.list),
get_list_head(pfree_recv_queue));
if (padapter != NULL) {
if (pfree_recv_queue == &precvpriv->free_recv_queue)
@ -297,7 +297,7 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter,
}
/* Then enqueue the 0~(n-1) fragment to the defrag_q */
phead = get_list_head(pdefrag_q);
list_insert_tail(&pfhdr->list, phead);
list_add_tail(&pfhdr->list, phead);
prtnframe = NULL;
} else {
/* can't find this ta's defrag_queue, so free this
@ -312,7 +312,7 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter,
* enqueue the last fragment */
if (pdefrag_q != NULL) {
phead = get_list_head(pdefrag_q);
list_insert_tail(&pfhdr->list, phead);
list_add_tail(&pfhdr->list, phead);
/*call recvframe_defrag to defrag*/
precv_frame = recvframe_defrag(padapter, pdefrag_q);
prtnframe = precv_frame;
@ -512,7 +512,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
break;
}
list_delete(&(prframe->u.hdr.list));
list_insert_tail(&(prframe->u.hdr.list), plist);
list_add_tail(&(prframe->u.hdr.list), plist);
return true;
}

Просмотреть файл

@ -126,7 +126,7 @@ static sint _enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
if (obj == NULL)
return _SUCCESS;
spin_lock_irqsave(&queue->lock, irqL);
list_insert_tail(&obj->list, &queue->queue);
list_add_tail(&obj->list, &queue->queue);
spin_unlock_irqrestore(&queue->lock, irqL);
return _SUCCESS;
}
@ -190,7 +190,7 @@ u32 r8712_enqueue_cmd_ex(struct cmd_priv *pcmdpriv, struct cmd_obj *obj)
return _FAIL;
queue = &pcmdpriv->cmd_queue;
spin_lock_irqsave(&queue->lock, irqL);
list_insert_tail(&obj->list, &queue->queue);
list_add_tail(&obj->list, &queue->queue);
spin_unlock_irqrestore(&queue->lock, irqL);
up(&pcmdpriv->cmd_queue_sema);
return _SUCCESS;
@ -956,7 +956,7 @@ void r8712_createbss_cmd_callback(struct _adapter *padapter,
goto createbss_cmd_fail;
pwlan->last_scanned = jiffies;
} else
list_insert_tail(&(pwlan->list),
list_add_tail(&(pwlan->list),
&pmlmepriv->scanned_queue.queue);
pnetwork->Length = r8712_get_ndis_wlan_bssid_ex_sz(pnetwork);
memcpy(&(pwlan->network), pnetwork, pnetwork->Length);

Просмотреть файл

@ -132,7 +132,7 @@ uint r8712_alloc_io_queue(struct _adapter *adapter)
pio_req = (struct io_req *)(pio_queue->free_ioreqs_buf);
for (i = 0; i < NUM_IOREQ; i++) {
INIT_LIST_HEAD(&pio_req->list);
list_insert_tail(&pio_req->list, &pio_queue->free_ioreqs);
list_add_tail(&pio_req->list, &pio_queue->free_ioreqs);
pio_req++;
}
if ((register_intf_hdl((u8 *)adapter, &(pio_queue->intf))) == _FAIL)

Просмотреть файл

@ -70,7 +70,7 @@ static sint _init_mlme_priv(struct _adapter *padapter)
pnetwork = (struct wlan_network *)pbuf;
for (i = 0; i < MAX_BSS_CNT; i++) {
INIT_LIST_HEAD(&(pnetwork->list));
list_insert_tail(&(pnetwork->list),
list_add_tail(&(pnetwork->list),
&(pmlmepriv->free_bss_pool.queue));
pnetwork++;
}
@ -118,7 +118,7 @@ static void _free_network(struct mlme_priv *pmlmepriv,
return;
spin_lock_irqsave(&free_queue->lock, irqL);
list_delete(&pnetwork->list);
list_insert_tail(&pnetwork->list, &free_queue->queue);
list_add_tail(&pnetwork->list, &free_queue->queue);
pmlmepriv->num_of_scanned--;
spin_unlock_irqrestore(&free_queue->lock, irqL);
}
@ -133,7 +133,7 @@ static void _free_network_nolock(struct mlme_priv *pmlmepriv,
if (pnetwork->fixed == true)
return;
list_delete(&pnetwork->list);
list_insert_tail(&pnetwork->list, get_list_head(free_queue));
list_add_tail(&pnetwork->list, get_list_head(free_queue));
pmlmepriv->num_of_scanned--;
}
@ -437,7 +437,7 @@ static void update_scanned_network(struct _adapter *adapter,
bssid_ex_sz = r8712_get_ndis_wlan_bssid_ex_sz(target);
target->Length = bssid_ex_sz;
memcpy(&pnetwork->network, target, bssid_ex_sz);
list_insert_tail(&pnetwork->list, &queue->queue);
list_add_tail(&pnetwork->list, &queue->queue);
}
} else {
/* we have an entry and we are going to update it. But

Просмотреть файл

@ -66,7 +66,7 @@ static int init_mp_priv(struct mp_priv *pmp_priv)
pmp_xmitframe = (struct mp_xmit_frame *)pmp_priv->pmp_xmtframe_buf;
for (i = 0; i < NR_MP_XMITFRAME; i++) {
INIT_LIST_HEAD(&(pmp_xmitframe->list));
list_insert_tail(&(pmp_xmitframe->list),
list_add_tail(&(pmp_xmitframe->list),
&(pmp_priv->free_mp_xmitqueue.queue));
pmp_xmitframe->pkt = NULL;
pmp_xmitframe->frame_tag = MP_FRAMETAG;

Просмотреть файл

@ -87,7 +87,7 @@ sint _r8712_init_recv_priv(struct recv_priv *precvpriv,
precvframe = (union recv_frame *)precvpriv->precv_frame_buf;
for (i = 0; i < NR_RECVFRAME; i++) {
INIT_LIST_HEAD(&(precvframe->u.list));
list_insert_tail(&(precvframe->u.list),
list_add_tail(&(precvframe->u.list),
&(precvpriv->free_recv_queue.queue));
r8712_os_recv_resource_alloc(padapter, precvframe);
precvframe->u.hdr.adapter = padapter;

Просмотреть файл

@ -66,7 +66,7 @@ u32 _r8712_init_sta_priv(struct sta_priv *pstapriv)
for (i = 0; i < NUM_STA; i++) {
_init_stainfo(psta);
INIT_LIST_HEAD(&(pstapriv->sta_hash[i]));
list_insert_tail(&psta->list,
list_add_tail(&psta->list,
get_list_head(&pstapriv->free_sta_queue));
psta++;
}
@ -137,7 +137,7 @@ struct sta_info *r8712_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
goto exit;
}
phash_list = &(pstapriv->sta_hash[index]);
list_insert_tail(&psta->hash_list, phash_list);
list_add_tail(&psta->hash_list, phash_list);
pstapriv->asoc_sta_count++;
/* For the SMC router, the sequence number of first packet of WPS handshake
@ -208,7 +208,7 @@ void r8712_free_stainfo(struct _adapter *padapter, struct sta_info *psta)
}
spin_lock(&(pfree_sta_queue->lock));
/* insert into free_sta_queue; 20061114 */
list_insert_tail(&psta->list, get_list_head(pfree_sta_queue));
list_add_tail(&psta->list, get_list_head(pfree_sta_queue));
spin_unlock(&(pfree_sta_queue->lock));
}

Просмотреть файл

@ -103,7 +103,7 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
pxframe->pkt = NULL;
pxframe->buf_addr = NULL;
pxframe->pxmitbuf = NULL;
list_insert_tail(&(pxframe->list),
list_add_tail(&(pxframe->list),
&(pxmitpriv->free_xmit_queue.queue));
pxframe++;
}
@ -143,7 +143,7 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
((addr_t) (pxmitbuf->pallocated_buf) &
(XMITBUF_ALIGN_SZ - 1));
r8712_xmit_resource_alloc(padapter, pxmitbuf);
list_insert_tail(&pxmitbuf->list,
list_add_tail(&pxmitbuf->list,
&(pxmitpriv->free_xmitbuf_queue.queue));
pxmitbuf++;
}
@ -767,7 +767,7 @@ int r8712_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
return _FAIL;
spin_lock_irqsave(&pfree_xmitbuf_queue->lock, irqL);
list_delete(&pxmitbuf->list);
list_insert_tail(&(pxmitbuf->list), get_list_head(pfree_xmitbuf_queue));
list_add_tail(&(pxmitbuf->list), get_list_head(pfree_xmitbuf_queue));
pxmitpriv->free_xmitbuf_cnt++;
spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, irqL);
return _SUCCESS;
@ -833,7 +833,7 @@ void r8712_free_xmitframe(struct xmit_priv *pxmitpriv,
pndis_pkt = pxmitframe->pkt;
pxmitframe->pkt = NULL;
}
list_insert_tail(&pxmitframe->list, get_list_head(pfree_xmit_queue));
list_add_tail(&pxmitframe->list, get_list_head(pfree_xmit_queue));
pxmitpriv->free_xmitframe_cnt++;
spin_unlock_irqrestore(&pfree_xmit_queue->lock, irqL);
if (netif_queue_stopped(padapter->pnetdev))
@ -940,9 +940,9 @@ sint r8712_xmit_classifier(struct _adapter *padapter,
psta, pattrib->priority);
spin_lock_irqsave(&pstapending->lock, irqL0);
if (list_empty(&ptxservq->tx_pending))
list_insert_tail(&ptxservq->tx_pending,
list_add_tail(&ptxservq->tx_pending,
get_list_head(pstapending));
list_insert_tail(&pxmitframe->list,
list_add_tail(&pxmitframe->list,
get_list_head(&ptxservq->sta_pending));
ptxservq->qcnt++;
spin_unlock_irqrestore(&pstapending->lock, irqL0);