Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8652406ybn; Tue, 1 Oct 2019 11:09:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5dqycKIZnoU7ako88iEV/A5zRWoAYw26SllpJU/WVF8m4+GP+LIKCfN5W/eyAchZlg0E+ X-Received: by 2002:a50:b685:: with SMTP id d5mr27091896ede.258.1569953362117; Tue, 01 Oct 2019 11:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569953362; cv=none; d=google.com; s=arc-20160816; b=HpVjUdFV9f39OfeF490fRDhXMtqydcfiBksZJsvyH1lb76IdyOAiOz2c2VIbU7yOyN MstrCZesJFX1D1iwlTgebgvvriG5ELsOym3g0G0pC69cM9CeAinLV3CwZuGuOQ0RUXih nQ9STScL+piiChWnKDoYWTdwG4p2o7suajLxG+aJzq9Wvwh+CnbwIEuxV0oddlV6SxnO WXqNCCy5Bef13JCU4jsXWbeScYVb8vtDlmjH4kh1qevDyuPRECk6zxsgEqtf55P3Zkm5 2LILNdslkRgmNkotcwCyewBFc/eT/n5DwWgisn7OnqSv0mbm79mtfckKFF2IjOziFB76 Na8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=eJey+h2TK/YL5Fi1rpmODoCRsFDbbUcGhtTz0PcN0CE=; b=0x4eEO24wChfeS58GTvCfJPZllrA/IF07Yo+zQhG566KEzjDlNK11B2wRd3owayVU5 aA3Ps1c2gTtRzBapnCvpSuJyvfj7jJZ3YSDgmEXnHWqExNgMaqsjLtDIzvZLvGUM8ZAn uKzTRImYLle7sB8IHRFu6V0C4PSBfFBTFBHKLMFYCa2G5wfQyhuPJPguYaOhcCHPbHV7 eK6rpO8yawYNdm9hh4ew6bBaLiSZgsefRZFd0kLPa560OegzRYrcBYSn3RUPNkH7Ybl5 2p4aJAxgYSqIOEyBdEB+URcgeSEKXnYOBzy7FbfGAec+efYv3J4NX0t0Nhu7VMZ1x8r6 Lsew== 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 v27si9365228ejb.182.2019.10.01.11.08.57; Tue, 01 Oct 2019 11:09:22 -0700 (PDT) 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 S1731838AbfJASGZ (ORCPT + 99 others); Tue, 1 Oct 2019 14:06:25 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:48676 "EHLO baptiste.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727269AbfJASGZ (ORCPT ); Tue, 1 Oct 2019 14:06:25 -0400 Received: from ramsan ([84.194.98.4]) by baptiste.telenet-ops.be with bizsmtp id 8J6P2100H05gfCL01J6Pmp; Tue, 01 Oct 2019 20:06:25 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1iFMXX-0008KX-7p; Tue, 01 Oct 2019 20:06:23 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1iFMXX-0000Dl-5H; Tue, 01 Oct 2019 20:06:23 +0200 From: Geert Uytterhoeven To: Joerg Roedel Cc: Stephen Boyd , Greg Kroah-Hartman , linux-renesas-soc@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] iommu/ipmmu-vmsa: Only call platform_get_irq() when interrupt is mandatory Date: Tue, 1 Oct 2019 20:06:22 +0200 Message-Id: <20191001180622.806-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As platform_get_irq() now prints an error when the interrupt does not exist, calling it gratuitously causes scary messages like: ipmmu-vmsa e6740000.mmu: IRQ index 0 not found Fix this by moving the call to platform_get_irq() down, where the existence of the interrupt is mandatory. Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Geert Uytterhoeven --- This is a fix for v5.4-rc1. --- drivers/iommu/ipmmu-vmsa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index 9da8309f71708f21..237103465b824c51 100644 --- a/drivers/iommu/ipmmu-vmsa.c +++ b/drivers/iommu/ipmmu-vmsa.c @@ -1086,8 +1086,6 @@ static int ipmmu_probe(struct platform_device *pdev) mmu->num_ctx = min(IPMMU_CTX_MAX, mmu->features->number_of_contexts); - irq = platform_get_irq(pdev, 0); - /* * Determine if this IPMMU instance is a root device by checking for * the lack of has_cache_leaf_nodes flag or renesas,ipmmu-main property. @@ -1106,6 +1104,7 @@ static int ipmmu_probe(struct platform_device *pdev) /* Root devices have mandatory IRQs */ if (ipmmu_is_root(mmu)) { + irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_err(&pdev->dev, "no IRQ found\n"); return irq; -- 2.17.1