From patchwork Thu Jan 21 00:17:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loc Ho X-Patchwork-Id: 8075651 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 A28219F1C0 for ; Thu, 21 Jan 2016 00:19:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C2028205CA for ; Thu, 21 Jan 2016 00:19:39 +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 0961C205E5 for ; Thu, 21 Jan 2016 00:19:39 +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 1aM2xE-0002dN-2F; Thu, 21 Jan 2016 00:18:24 +0000 Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aM2x0-0002VE-U4 for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2016 00:18:11 +0000 Received: by mail-pf0-x235.google.com with SMTP id e65so13073467pfe.0 for ; Wed, 20 Jan 2016 16:17:50 -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=LmP7DNERZcBpUk29DO/LVNMiUV4R6lwadHL+2boDlRg=; b=NsqASfgZVTX1a7VjyFwTVKNdhJlqJMQd9G5cIRhZYUorajVO+U1UvqNwrGb534tc0q /hVMmdcH/6kApobot7Rrjtgh5M72UEiYEgyvpJOn47tN9TnsKCwp8V1RFF5vAea0MtrT 7yL4yi6rws9jyTEhz7xn8P5ByZWVma6w4eD98= 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=LmP7DNERZcBpUk29DO/LVNMiUV4R6lwadHL+2boDlRg=; b=VXNTWfj0JZ4pI3uHRoxIE7Q7PIJa6DH65fqCZjR6gpdKLhCEqNoPtGlYLvfqinJmBC xpYj3y6pAQSdLiKC8Uk/vLRs3wgKLj0wJVurumsARN89m3W7igI2+8WUVKyVip9R6Jxi 7vcF3nRt1/jHDsmkke8++iIAj78h9Up1JtoIVtIsEd0WX3GMjfAj+Zh31tsxfUAxXc/B +2AxvZOZIAkwx1dqdjVVClPfyOvq5u5vsjPjSWZgAA9bdFWzZ8TDj46QGCUHyqXY+llk SViKb55Hhu1MlA/6IauyLmaaH1S0yeNH3S/JOpnzDcXaNZxLR3DetVxpadkaZP8d+5bX imgA== X-Gm-Message-State: ALoCoQl9oTOmHtz8im9nOET0T8TuwovKcSsdm0CV9QfCh9S2j4JLmvIHdAkcYt+UwXTMdNrvT65BiiNLrrYLz8McVyDCOMwSIA== X-Received: by 10.98.72.132 with SMTP id q4mr55995425pfi.53.1453335470101; Wed, 20 Jan 2016 16:17:50 -0800 (PST) Received: from localhost.localdomain ([198.137.200.11]) by smtp.gmail.com with ESMTPSA id ry1sm51593092pab.30.2016.01.20.16.17.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jan 2016 16:17:48 -0800 (PST) From: Loc Ho To: bp@alien8.de, dougthompson@xmission.com, mchehab@osg.samsung.com, tomasz.nowicki@linaro.org, fu.wei@linaro.org, rjw@rjwysocki.net, lenb@kernel.org Subject: [PATCH v4 1/2] acpi: Fix proper return code for function acpi_gsi_to_irq Date: Wed, 20 Jan 2016 17:17:38 -0700 Message-Id: <1453335459-3617-2-git-send-email-lho@apm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1453335459-3617-1-git-send-email-lho@apm.com> References: <1453335459-3617-1-git-send-email-lho@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160120_161811_024538_6DDBE16B X-CRM114-Status: GOOD ( 12.22 ) 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: devicetree@vger.kernel.org, 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,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 The function acpi_gsi_to_irq must return 0 on success as the caller ghes_probe expects an 0 for success. This change also matches x86 implementation. 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 ee9e0f2..7b109bd 100644 --- a/drivers/acpi/gsi.c +++ b/drivers/acpi/gsi.c @@ -24,7 +24,7 @@ static struct fwnode_handle *acpi_gsi_domain_id; * * 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) @@ -37,7 +37,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);