Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2634622ybf; Mon, 2 Mar 2020 12:37:54 -0800 (PST) X-Google-Smtp-Source: ADFU+vtG+qTjetKLjyEEcGCukSOTgTibPmUYo7oFA+y8Df9QDjh81K+A32v8W8dfb5qILdKjKe8j X-Received: by 2002:a05:6830:1198:: with SMTP id u24mr739261otq.215.1583181474567; Mon, 02 Mar 2020 12:37:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583181474; cv=none; d=google.com; s=arc-20160816; b=Q0HI4kSworRNgfxByIWFy5Spxj5SYvc4rFyP8YlfOlJyBp2yDAEJ+ibW10Twv9wz6U 8rRVUvmWNCzrbbDA1MB7gZqCd8ww3VUF4CjgQETPKA2qlVcOiOgtIcv+raQlXP2a3SVr 5lOt2TRMR/DoFsHrmEOWFWY15xySewxlea3ZfVIDmIE2mu1Xdlg+KFG9Cb+RP0SpGIW0 yY2llvSCgAk9BqdRkYjSne8UhhfshIhFIePa+WHi+dfIfI3Ms5ApTsz0UILUjR0TrUJP Q6uhK+NpEdYDaL7TBF/awfO/8kFkd+CsZKsgGG5ej32CzbOsXir5XqpEeFmi8yN/7UOr plNg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=zqvrLEQk5BMgju+RSyn/5B7EOYMlf2EShnIdivH2s10=; b=DA0OZVWfxNzhkbRiBiiZzy1OtpdTiQ+BpIiXBAy8rb+z+j7MGbEodUfwOKRJlgsHtO 1QEhWk1+gbxhpCcTQIx5bmJphy6MFsZ6+Nw6vDL7dkZiBQJwmYxdsLfRFUG3OXlcSrDl ypg811Mqp1WxBXCVG2td1SwKhbOCNFlhbMh4IEo2kRZBgOW6Bz5AaYmIgFkMNYTtilxq nyQMuxSyBN70LUR89LfzvwuXZmt5oVW/oUwwq9gii+H1ohkIqvDlSTey20TDIdZqPSTD 3u4+e+HqOMqyuZBozSx3JzuLyj/S4/sFc5MreuKafVLzg32ytCYbS3ojRs31jvih8LLn +Xlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dbwJ1eJt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73si7239741oii.60.2020.03.02.12.37.41; Mon, 02 Mar 2020 12:37:54 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dbwJ1eJt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726747AbgCBUha (ORCPT + 99 others); Mon, 2 Mar 2020 15:37:30 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:34447 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726661AbgCBUha (ORCPT ); Mon, 2 Mar 2020 15:37:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583181449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zqvrLEQk5BMgju+RSyn/5B7EOYMlf2EShnIdivH2s10=; b=dbwJ1eJtSHzvFJbMmWozCRmkgWJReHVxTKRkXu7DA8A8e+vqcICdeCVkLnst2Dnr84shAh 1VDa5iV5VZN4h1bthp2/r3BR4m/1vQ3626pBb4G36Ih7oAnA/5H9/GD0lw9taA/PkGHYYb gd7o+WKrT/uEwNsrsIMOPI2wuJKG9K8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-342-bC9Ty_ouO8GLgdEtXWVwHg-1; Mon, 02 Mar 2020 15:37:27 -0500 X-MC-Unique: bC9Ty_ouO8GLgdEtXWVwHg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6328D13E5; Mon, 2 Mar 2020 20:37:26 +0000 (UTC) Received: from laptop.redhat.com (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B5045DD73; Mon, 2 Mar 2020 20:37:19 +0000 (UTC) From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, alex.williamson@redhat.com Cc: andre.przywara@arm.com, stable@vger.kernel.org, cohuck@redhat.com Subject: [PATCH] vfio: platform: Switch to platform_get_irq_optional() Date: Mon, 2 Mar 2020 21:37:15 +0100 Message-Id: <20200302203715.13889-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Eric Auger Cc: stable@vger.kernel.org # v5.3+ --- 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/platfor= m/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 =3D (struct platform_device *) vdev->opaqu= e; =20 - return platform_get_irq(pdev, i); + return platform_get_irq_optional(pdev, i); } =20 static int vfio_platform_probe(struct platform_device *pdev) --=20 2.20.1