Skip to content

Commit

Permalink
APEI, GHES: Cleanup unnecessary function for lockless list
Browse files Browse the repository at this point in the history
We have a generic function to reverse a lockless list, kill homegrown
copy.

Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
Link: http://lkml.kernel.org/r/1406530260-26078-2-git-send-email-gong.chen@linux.intel.com
Acked-by: Tony Luck <tony.luck@intel.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
[ Boris: correct commit msg ]
Signed-off-by: Borislav Petkov <bp@suse.de>
  • Loading branch information
Chen, Gong authored and Borislav Petkov committed Oct 21, 2014
1 parent f114040 commit 8d21d4c
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions drivers/acpi/apei/ghes.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,20 +738,6 @@ static LIST_HEAD(ghes_nmi);

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)
{
struct llist_node *llnode, *next;
Expand All @@ -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,
* revert it back to proper order.
*/
llnode = llist_nodes_reverse(llnode);
llnode = llist_reverse_order(llnode);
while (llnode) {
next = llnode->next;
estatus_node = llist_entry(llnode, struct ghes_estatus_node,
Expand Down Expand Up @@ -798,7 +784,7 @@ static void ghes_print_queued_estatus(void)
* Because the time order of estatus in list is reversed,
* revert it back to proper order.
*/
llnode = llist_nodes_reverse(llnode);
llnode = llist_reverse_order(llnode);
while (llnode) {
estatus_node = llist_entry(llnode, struct ghes_estatus_node,
llnode);
Expand Down

0 comments on commit 8d21d4c

Please sign in to comment.