diff options
author | Chen, Gong <gong.chen@linux.intel.com> | 2014-07-28 02:50:59 -0400 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2014-10-21 15:48:19 -0400 |
commit | 8d21d4c91efaed3eb60cc64d43889665a4bd7a36 (patch) | |
tree | d93d423a2bbf8da04ab42df5b48b46687a7d28c4 /drivers/acpi/apei | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) |
APEI, GHES: Cleanup unnecessary function for lockless list
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>
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r-- | drivers/acpi/apei/ghes.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index fc5f780bb61d..9dcc9158c8e2 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c | |||
@@ -738,20 +738,6 @@ static LIST_HEAD(ghes_nmi); | |||
738 | 738 | ||
739 | static int ghes_panic_timeout __read_mostly = 30; | 739 | static int ghes_panic_timeout __read_mostly = 30; |
740 | 740 | ||
741 | static struct llist_node *llist_nodes_reverse(struct llist_node *llnode) | ||
742 | { | ||
743 | struct llist_node *next, *tail = NULL; | ||
744 | |||
745 | while (llnode) { | ||
746 | next = llnode->next; | ||
747 | llnode->next = tail; | ||
748 | tail = llnode; | ||
749 | llnode = next; | ||
750 | } | ||
751 | |||
752 | return tail; | ||
753 | } | ||
754 | |||
755 | static void ghes_proc_in_irq(struct irq_work *irq_work) | 741 | static void ghes_proc_in_irq(struct irq_work *irq_work) |
756 | { | 742 | { |
757 | struct llist_node *llnode, *next; | 743 | struct llist_node *llnode, *next; |
@@ -765,7 +751,7 @@ static void ghes_proc_in_irq(struct irq_work *irq_work) | |||
765 | * Because the time order of estatus in list is reversed, | 751 | * Because the time order of estatus in list is reversed, |
766 | * revert it back to proper order. | 752 | * revert it back to proper order. |
767 | */ | 753 | */ |
768 | llnode = llist_nodes_reverse(llnode); | 754 | llnode = llist_reverse_order(llnode); |
769 | while (llnode) { | 755 | while (llnode) { |
770 | next = llnode->next; | 756 | next = llnode->next; |
771 | estatus_node = llist_entry(llnode, struct ghes_estatus_node, | 757 | estatus_node = llist_entry(llnode, struct ghes_estatus_node, |
@@ -798,7 +784,7 @@ static void ghes_print_queued_estatus(void) | |||
798 | * Because the time order of estatus in list is reversed, | 784 | * Because the time order of estatus in list is reversed, |
799 | * revert it back to proper order. | 785 | * revert it back to proper order. |
800 | */ | 786 | */ |
801 | llnode = llist_nodes_reverse(llnode); | 787 | llnode = llist_reverse_order(llnode); |
802 | while (llnode) { | 788 | while (llnode) { |
803 | estatus_node = llist_entry(llnode, struct ghes_estatus_node, | 789 | estatus_node = llist_entry(llnode, struct ghes_estatus_node, |
804 | llnode); | 790 | llnode); |