From patchwork Fri Dec 27 14:38:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ethan Zhao X-Patchwork-Id: 3412001 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 BEE769F169 for ; Fri, 27 Dec 2013 14:39:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F3B1F20161 for ; Fri, 27 Dec 2013 14:38:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2178820125 for ; Fri, 27 Dec 2013 14:38:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753263Ab3L0Oi6 (ORCPT ); Fri, 27 Dec 2013 09:38:58 -0500 Received: from mail-pb0-f41.google.com ([209.85.160.41]:60470 "EHLO mail-pb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753080Ab3L0Oi5 (ORCPT ); Fri, 27 Dec 2013 09:38:57 -0500 Received: by mail-pb0-f41.google.com with SMTP id jt11so9300793pbb.14 for ; Fri, 27 Dec 2013 06:38:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=PffvssScZkTbMAFWhcjIuHUNnorEgc7YM7PSKbXB1Xk=; b=gED0ZoMeM6yJaFtkQFNYCX7r62PnPk0rGq89rGggiKcuniLK1EpmJkS5Cb6KBWhkVs C947pqvpBEYsjEap3LKPDz81BOkPTadIjiiahOhpeDQnk23KRXbmmJKgtrIeO8cshE++ BnJ3h8NY9kz98E/+NOMH2X1EI5ySWKsrfCBSkrv1hS4Dss9t/AwfsCx1Et1aKiWg6VD/ JJUZlLMdyA2f89ynt+2z4gpcUQCEr9lNm938Bo15afQYKliggZFNYRrLDOzO7ehJfXBQ FcUPk1pv5bRhrbY2Iu87+D3/f6MviM14N2OL8LB/ReBp5JKxRvNR3tvwgHmST6uOTEKo 2tWA== X-Received: by 10.66.228.201 with SMTP id sk9mr3265902pac.134.1388155137003; Fri, 27 Dec 2013 06:38:57 -0800 (PST) Received: from localhost.localdomain ([111.196.85.10]) by mx.google.com with ESMTPSA id da3sm7476599pbc.30.2013.12.27.06.38.51 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 27 Dec 2013 06:38:55 -0800 (PST) From: Ethan Zhao To: ying.huang@intel.com, tony.luck@intel.com Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Ethan Zhao Subject: [PATCH] ghes: don't return 0 even when failed to read estatus in ghes_proc() Date: Fri, 27 Dec 2013 22:38:40 +0800 Message-Id: <1388155120-419-1-git-send-email-ethan.kernel@gmail.com> X-Mailer: git-send-email 1.8.3.4 (Apple Git-47) 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.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 ghes_proc() always return 0 even failed to read estatus, so when it is called in interrupt handler ghes_irq_func(), we don't know the interrupt was handled well or not, because the ghes_irq_func() will return only IRQ_HANDLED. Signed-off-by: Ethan Zhao --- drivers/acpi/apei/ghes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 8ec37bb..9368b73 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -665,7 +665,7 @@ static void ghes_estatus_cache_add( static int ghes_proc(struct ghes *ghes) { - int rc; + int rc = 0; rc = ghes_read_estatus(ghes, 0); if (rc) @@ -677,7 +677,7 @@ static int ghes_proc(struct ghes *ghes) ghes_do_proc(ghes, ghes->estatus); out: ghes_clear_estatus(ghes); - return 0; + return rc; } static void ghes_add_timer(struct ghes *ghes)