From patchwork Wed Jul 16 02:34:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gong X-Patchwork-Id: 4564441 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 85FCEC0514 for ; Wed, 16 Jul 2014 03:05:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88CFC201BF for ; Wed, 16 Jul 2014 03:05:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A5602201D3 for ; Wed, 16 Jul 2014 03:05:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756910AbaGPDFV (ORCPT ); Tue, 15 Jul 2014 23:05:21 -0400 Received: from mga09.intel.com ([134.134.136.24]:57989 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760674AbaGPDFT (ORCPT ); Tue, 15 Jul 2014 23:05:19 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 15 Jul 2014 19:59:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,669,1400050800"; d="scan'208";a="573811878" Received: from gchen-sby.bj.intel.com (HELO localhost) ([10.238.158.82]) by orsmga002.jf.intel.com with ESMTP; 15 Jul 2014 20:05:10 -0700 From: "Chen, Gong" To: tony.luck@intel.com, bp@alien8.de Cc: linux-acpi@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, "Chen, Gong" Subject: [PATCH 1/3] APEI, GHES: Cleanup unnecessary function for lock-less list Date: Tue, 15 Jul 2014 22:34:40 -0400 Message-Id: <1405478082-30757-2-git-send-email-gong.chen@linux.intel.com> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: <1405478082-30757-1-git-send-email-gong.chen@linux.intel.com> References: <1405478082-30757-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=-6.9 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 --- 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);