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: 7574241 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BB7209FCBF for ; Sat, 7 Nov 2015 00:54:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2FA5206C0 for ; Sat, 7 Nov 2015 00:54:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1290A206D2 for ; Sat, 7 Nov 2015 00:54:27 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZurkJ-0003Ru-Lz; Sat, 07 Nov 2015 00:52:43 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZurkF-0003OL-MA for linux-arm-kernel@lists.infradead.org; Sat, 07 Nov 2015 00:52:40 +0000 Received: by pasz6 with SMTP id z6so142255965pas.2 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=WTmfsbqgx5o2X6++XsVdE/gt1vQ2iNye9AZPfBsJvN8TkAsWOxIWGuU++lYptNHW44 M9Rg5bOo/3Rn8qwOakzzEyNCB3nCNy+9ohakNEQTUaryje+lWv/aTBzKAFQ3VfYK3FH2 bZ+uIeppyH5jpB4JVapeuZmY4TmIZjoGkJ1w57gNg0/UxQf/aVjtQ9HSLjFDIA37me3p lKLwDPFCFyVI4rY6IBwKxymTUqzprlzW4ISJtTSIWASmq/yQxygBhf6ykaEd04v37Gq6 a+RprLBmudspZzrdprzy/ghTdOzZ4p1rEVY+isqSSrs1MEuMLN4FJIWkT9Gsixm/MK8S TmwQ== X-Gm-Message-State: ALoCoQk3gZW7ZplSFyZzP2aKjPrZtlIdmMn01AhjVaWtA70EDStuszPf1KtYJz8tvMMVlfKzx5cW 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151106_165239_862006_A058DA29 X-CRM114-Status: GOOD ( 13.35 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jcm@redhat.com, patches@apm.com, linux-acpi@vger.kernel.org, Loc Ho , Tuan Phan , linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 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);