summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium/liquidio/lio_main.c
diff options
context:
space:
mode:
authorIntiyaz Basha2018-04-28 08:32:45 +0200
committerDavid S. Miller2018-04-30 15:26:28 +0200
commit85a0cd81863469484f22a9b69c7f4440989d32b8 (patch)
tree7eba3f162cb01bb3faa31e3bc19a127d2ce9c48d /drivers/net/ethernet/cavium/liquidio/lio_main.c
parentliquidio: Moved common function if_cfg_callback to lio_core.c (diff)
downloadkernel-qcow2-linux-85a0cd81863469484f22a9b69c7f4440989d32b8.tar.gz
kernel-qcow2-linux-85a0cd81863469484f22a9b69c7f4440989d32b8.tar.xz
kernel-qcow2-linux-85a0cd81863469484f22a9b69c7f4440989d32b8.zip
liquidio: Moved common function list_delete_head to octeon_network.h
Moved common function list_delete_head to octeon_network.h and renamed it to lio_list_delete_head Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com> Acked-by: Derek Chickles <derek.chickles@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio/lio_main.c')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/lio_main.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 4ac3c4b8ce49..c11724504ab6 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -542,25 +542,6 @@ static inline int check_txq_status(struct lio *lio)
}
/**
- * Remove the node at the head of the list. The list would be empty at
- * the end of this call if there are no more nodes in the list.
- */
-static inline struct list_head *list_delete_head(struct list_head *root)
-{
- struct list_head *node;
-
- if ((root->prev == root) && (root->next == root))
- node = NULL;
- else
- node = root->next;
-
- if (node)
- list_del(node);
-
- return node;
-}
-
-/**
* \brief Delete gather lists
* @param lio per-network private data
*/
@@ -578,7 +559,7 @@ static void delete_glists(struct lio *lio)
for (i = 0; i < lio->linfo.num_txpciq; i++) {
do {
g = (struct octnic_gather *)
- list_delete_head(&lio->glist[i]);
+ lio_list_delete_head(&lio->glist[i]);
if (g)
kfree(g);
} while (g);
@@ -2590,7 +2571,7 @@ static int liquidio_xmit(struct sk_buff *skb, struct net_device *netdev)
spin_lock(&lio->glist_lock[q_idx]);
g = (struct octnic_gather *)
- list_delete_head(&lio->glist[q_idx]);
+ lio_list_delete_head(&lio->glist[q_idx]);
spin_unlock(&lio->glist_lock[q_idx]);
if (!g) {