From patchwork Sat Nov 7 00:51:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loc Ho X-Patchwork-Id: 7574221 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ACB3AC05C6 for ; Sat, 7 Nov 2015 00:52:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C59CC206D9 for ; Sat, 7 Nov 2015 00:52:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9EFB206C0 for ; Sat, 7 Nov 2015 00:52:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754507AbbKGAwT (ORCPT ); Fri, 6 Nov 2015 19:52:19 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:34806 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751941AbbKGAwS (ORCPT ); Fri, 6 Nov 2015 19:52:18 -0500 Received: by padhx2 with SMTP id hx2so129878863pad.1 for ; Fri, 06 Nov 2015 16:52:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZIamRANCRyrMpGFxaYhIelnB94I8lrtc2vNu4IAMvvc=; b=bcu5M9fNMezc8k0mWA6CK/SPzmSUPvjTNIcx8+WtpmApJ5BqhYTRfouURQx8sIVBFs RTmMnpRUDGWIbf4C/itUw+zibrKLXq6tiFKfNP3hApBNlP6YE8bXt95EaNeUVepyhPet 1nLsPoqjqIzLaW5UWdbfxKBSELPf3Oo/9HL4I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZIamRANCRyrMpGFxaYhIelnB94I8lrtc2vNu4IAMvvc=; b=USuoDHZfyusyLw6G4PfYwygmKHxVvbPwgddf0bJAxtIND7Xub8bXLA1+AADpAwHdVq umrt3Y9ofhiFm8za+It198r+KlNgsOtcFyjK0xifxMYD4fI0I4Su2EDif48+2puzZjfR j5o7eSpEIOJRAtAgihp1ZORj4elo0hXVAKV8XYmwSLLJLuGKM9+kXgKpE7JdgeSuRwQK 0NkrsK+J+vFPup9euO98e2+gQSA2A8bK9dIO7bKEHknozvAm1jiDRk8vRRjHRNgNoHH2 3RBLZw4a0XbV3HAmSwW2nXVuVAa8nf7hcpXjGFRlrIVmojBMV9p1ak7yjUOidF2k7RUA xNaw== X-Gm-Message-State: ALoCoQktHbwA4Qlk4+hQn32bfw78Vls/iZ4eY2NF3nvtro8K3KaHNyjP2zYLtTtAp/E1dhUDwzNe X-Received: by 10.66.124.232 with SMTP id ml8mr21436514pab.91.1446857538087; Fri, 06 Nov 2015 16:52:18 -0800 (PST) Received: from localhost.localdomain ([198.137.200.11]) by smtp.gmail.com with ESMTPSA id rc5sm2195318pbc.95.2015.11.06.16.52.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Nov 2015 16:52:16 -0800 (PST) From: Loc Ho To: dougthompson@xmission.com, bp@alien8.de, mchehab@osg.samsung.com, tomasz.nowicki@linaro.org, fu.wei@linaro.org, rjw@rjwysocki.net, lenb@kernel.org Cc: linux-edac@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, jcm@redhat.com, patches@apm.com, Loc Ho , Tuan Phan Subject: [PATCH v3 1/2] acpi: Fix proper return code for function acpi_gsi_to_irq Date: Fri, 6 Nov 2015 17:51:58 -0700 Message-Id: <1446857519-5908-2-git-send-email-lho@apm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1446857519-5908-1-git-send-email-lho@apm.com> References: <1446857519-5908-1-git-send-email-lho@apm.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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_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 The function acpi_gsi_to_irq should returns 0 on success as upper function caller expect an 0 for sucesss. Signed-off-by: Tuan Phan Signed-off-by: Loc Ho --- drivers/acpi/gsi.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/gsi.c b/drivers/acpi/gsi.c index fa4585a..0ed1003 100644 --- a/drivers/acpi/gsi.c +++ b/drivers/acpi/gsi.c @@ -43,7 +43,7 @@ static unsigned int acpi_gsi_get_irq_type(int trigger, int polarity) * * irq location updated with irq value [>0 on success, 0 on failure] * - * Returns: linux IRQ number on success (>0) + * Returns: 0 on success * -EINVAL on failure */ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) @@ -56,7 +56,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) * *irq == 0 means no mapping, that should * be reported as a failure */ - return (*irq > 0) ? *irq : -EINVAL; + return (*irq > 0) ? 0 : -EINVAL; } EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);