Commit 8d21d4c9 authored by Chen, Gong's avatar Chen, Gong Committed by Borislav Petkov

APEI, GHES: Cleanup unnecessary function for lockless list

We have a generic function to reverse a lockless list, kill homegrown
copy.
Signed-off-by: default avatarChen, Gong <gong.chen@linux.intel.com>
Link: http://lkml.kernel.org/r/1406530260-26078-2-git-send-email-gong.chen@linux.intel.comAcked-by: default avatarTony Luck <tony.luck@intel.com>
Acked-by: default avatarNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
[ Boris: correct commit msg ]
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
parent f114040e
...@@ -738,20 +738,6 @@ static LIST_HEAD(ghes_nmi); ...@@ -738,20 +738,6 @@ static LIST_HEAD(ghes_nmi);
static int ghes_panic_timeout __read_mostly = 30; static int ghes_panic_timeout __read_mostly = 30;
static struct llist_node *llist_nodes_reverse(struct llist_node *llnode)
{
struct llist_node *next, *tail = NULL;
while (llnode) {
next = llnode->next;
llnode->next = tail;
tail = llnode;
llnode = next;
}
return tail;
}
static void ghes_proc_in_irq(struct irq_work *irq_work) static void ghes_proc_in_irq(struct irq_work *irq_work)
{ {
struct llist_node *llnode, *next; struct llist_node *llnode, *next;
...@@ -765,7 +751,7 @@ static void ghes_proc_in_irq(struct irq_work *irq_work) ...@@ -765,7 +751,7 @@ static void ghes_proc_in_irq(struct irq_work *irq_work)
* Because the time order of estatus in list is reversed, * Because the time order of estatus in list is reversed,
* revert it back to proper order. * revert it back to proper order.
*/ */
llnode = llist_nodes_reverse(llnode); llnode = llist_reverse_order(llnode);
while (llnode) { while (llnode) {
next = llnode->next; next = llnode->next;
estatus_node = llist_entry(llnode, struct ghes_estatus_node, estatus_node = llist_entry(llnode, struct ghes_estatus_node,
...@@ -798,7 +784,7 @@ static void ghes_print_queued_estatus(void) ...@@ -798,7 +784,7 @@ static void ghes_print_queued_estatus(void)
* Because the time order of estatus in list is reversed, * Because the time order of estatus in list is reversed,
* revert it back to proper order. * revert it back to proper order.
*/ */
llnode = llist_nodes_reverse(llnode); llnode = llist_reverse_order(llnode);
while (llnode) { while (llnode) {
estatus_node = llist_entry(llnode, struct ghes_estatus_node, estatus_node = llist_entry(llnode, struct ghes_estatus_node,
llnode); llnode);
......
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