From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756182AbdGKRXS (ORCPT ); Tue, 11 Jul 2017 13:23:18 -0400 Received: from foss.arm.com ([217.140.101.70]:47560 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752607AbdGKRXR (ORCPT ); Tue, 11 Jul 2017 13:23:17 -0400 Subject: Re: [PATCH] acpi: Fix proper return code for function acpi_gsi_to_irq To: Mark Salter , "Rafael J . Wysocki" References: <20170711164543.23439-1-msalter@redhat.com> Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Lorenzo Pieralisi From: Marc Zyngier Organization: ARM Ltd Message-ID: Date: Tue, 11 Jul 2017 18:23:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170711164543.23439-1-msalter@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org + Lorenzo, since he deals with ACPI on arm64. On 11/07/17 17:45, Mark Salter wrote: > 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. > > This patch was submitted around 4.5 timeframe but wasn't pushed because > it didn't fix a real problem. Now that RAS/GHES patches are in kernel, > this fixes an error seen on a Mustang (arm64) platform: > > GHES: Failed to map GSI to IRQ for generic hardware error source: 2 > GHES: probe of GHES.2 failed with error 81 > > Signed-off-by: Tuan Phan > Signed-off-by: Loc Ho > [rebased to v4.12-rc] > Signed-off-by: Mark Salter > --- > drivers/acpi/irq.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/acpi/irq.c b/drivers/acpi/irq.c > index 830299a..7c352cb 100644 > --- a/drivers/acpi/irq.c > +++ b/drivers/acpi/irq.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); > > -- Jazz is not dead. It just smells funny...