Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4371560ybf; Wed, 4 Mar 2020 02:40:12 -0800 (PST) X-Google-Smtp-Source: ADFU+vs8zOdXC+FTLzMBSiUo/ou3/olCt4/5B/NmKN8ZclCI4a37Zj62gIOImpV1paIwnSmUN1Pk X-Received: by 2002:aca:1c01:: with SMTP id c1mr1281567oic.18.1583318412706; Wed, 04 Mar 2020 02:40:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583318412; cv=none; d=google.com; s=arc-20160816; b=f4RBqZtqTGubvQuPDHSVtVnBrjH7yvX7xhnktG8djiN//uGK6ym/UPpYn9ZhrQ+YGV G56iLz/rXjyuVPXiI0UNobdKWfWypu/IO4PY5L526ODTJO/vsoNC6pbFMjIzOH/uI6Kl MjbLKKOt4/zp4szT57+2Lw4Ta2ubXPP3gtne6ceKjq9dgUrJm7gim38s3LOExAUgtVqa NdmqrnsT4HVs13rMembR0olFsDRh+WmDYW5qS8g+o21G4vLg6ml4AYB7gJdQq1uIb15d G8EIqHsgbofw29rB3RNb+sYIUZHuzkMyuXXCXx9GJHsipsvxcaYFnNz0aS0Heu0V2Ls7 T6Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=1vJMgeS+TjJoEJ+VGyAPjqmBi+62JpbKsHALSLAuSlc=; b=aycKgLWJ8ahL+YArW5zAoY88LhG/6L0U6JRuJ2SvLoYel6iLU13JG03DD3KsM50gdF ZEoCE/AuzCe9GPg38mSWDgC6w0DkB+2gbOdySHHLgERKz+WqOynZNrPuhuO04me1Q7yV 6creH9fq+DDI6xOdrJ3NsF9AxQ3V9N1EpPCW6NWEpDHgBbvqB/3LyUCNgicLTCBtdclQ vGeRLPm2LJRsHJZWetjd6Nl3nikQCu3xkwvUrVRRq/quKY88jujRsaoBonVhvP4GebaN +4ixQGgzlXEbsjQZ/a4Q6//d+0PTImyhyIwPuzMKTiYVH8g41I9q3aNfXV7RsQD4diVN 54mQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si811607ota.239.2020.03.04.02.39.58; Wed, 04 Mar 2020 02:40:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387707AbgCDKjz (ORCPT + 99 others); Wed, 4 Mar 2020 05:39:55 -0500 Received: from foss.arm.com ([217.140.110.172]:60620 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728301AbgCDKjz (ORCPT ); Wed, 4 Mar 2020 05:39:55 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9335530E; Wed, 4 Mar 2020 02:39:54 -0800 (PST) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 88AAE3F534; Wed, 4 Mar 2020 02:39:53 -0800 (PST) Date: Wed, 4 Mar 2020 10:39:50 +0000 From: Andre Przywara To: Eric Auger Cc: eric.auger.pro@gmail.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, alex.williamson@redhat.com, stable@vger.kernel.org, cohuck@redhat.com Subject: Re: [PATCH] vfio: platform: Switch to platform_get_irq_optional() Message-ID: <20200304103950.4e98d0ff@donnerap.cambridge.arm.com> In-Reply-To: <20200302203715.13889-1-eric.auger@redhat.com> References: <20200302203715.13889-1-eric.auger@redhat.com> Organization: ARM X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2 Mar 2020 21:37:15 +0100 Eric Auger wrote: > Since commit 7723f4c5ecdb ("driver core: platform: Add an error > message to platform_get_irq*()"), platform_get_irq() calls dev_err() > on an error. As we enumerate all interrupts until platform_get_irq() > fails, we now systematically get a message such as: > "vfio-platform fff51000.ethernet: IRQ index 3 not found" which is > a false positive. > > Let's use platform_get_irq_optional() instead. Yes, that seems correct to me and avoids the false positive error message I saw before. > Signed-off-by: Eric Auger > Cc: stable@vger.kernel.org # v5.3+ Reviewed-by: Andre Przywara Tested-by: Andre Przywara Thanks! Andre > --- > drivers/vfio/platform/vfio_platform.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vfio/platform/vfio_platform.c b/drivers/vfio/platform/vfio_platform.c > index ae1a5eb98620..1e2769010089 100644 > --- a/drivers/vfio/platform/vfio_platform.c > +++ b/drivers/vfio/platform/vfio_platform.c > @@ -44,7 +44,7 @@ static int get_platform_irq(struct vfio_platform_device *vdev, int i) > { > struct platform_device *pdev = (struct platform_device *) vdev->opaque; > > - return platform_get_irq(pdev, i); > + return platform_get_irq_optional(pdev, i); > } > > static int vfio_platform_probe(struct platform_device *pdev)