From patchwork Mon Jul 28 06:50:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gong X-Patchwork-Id: 4632511 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 31E6E9F3B4 for ; Mon, 28 Jul 2014 07:22:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6838E2012B for ; Mon, 28 Jul 2014 07:22:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A09FB20117 for ; Mon, 28 Jul 2014 07:22:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751073AbaG1HWN (ORCPT ); Mon, 28 Jul 2014 03:22:13 -0400 Received: from mga02.intel.com ([134.134.136.20]:14878 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750915AbaG1HWM (ORCPT ); Mon, 28 Jul 2014 03:22:12 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 28 Jul 2014 00:22:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,747,1400050800"; d="scan'208";a="579896559" Received: from gchen-sby.bj.intel.com (HELO localhost) ([10.238.158.82]) by orsmga002.jf.intel.com with ESMTP; 28 Jul 2014 00:22:09 -0700 From: "Chen, Gong" To: tony.luck@intel.com, n-horiguchi@ah.jp.nec.com, bp@alien8.de Cc: linux-acpi@vger.kernel.org, linux-mm@kvack.org, "Chen, Gong" Subject: [PATCH 1/2] APEI, GHES: Cleanup unnecessary function for lock-less list Date: Mon, 28 Jul 2014 02:50:59 -0400 Message-Id: <1406530260-26078-2-git-send-email-gong.chen@linux.intel.com> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: <1406530260-26078-1-git-send-email-gong.chen@linux.intel.com> References: <1406530260-26078-1-git-send-email-gong.chen@linux.intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We have provided a reverse function for lock-less list so delete uncessary codes. Signed-off-by: Chen, Gong Acked-by: Borislav Petkov Acked-by: Naoya Horiguchi --- drivers/acpi/apei/ghes.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index dab7cb7..1f9fba9 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -734,20 +734,6 @@ static int ghes_notify_sci(struct notifier_block *this, return ret; } -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; @@ -761,7 +747,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, @@ -794,7 +780,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);