From patchwork Sun Aug 2 14:25:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 11696471 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9596D912 for ; Sun, 2 Aug 2020 14:26:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60C1E20759 for ; Sun, 2 Aug 2020 14:26:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="l588oa8v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60C1E20759 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fJU6miMSzk0CxBXJarKknLECrFsN83QskK+f57aetG0=; b=l588oa8vHOTU757osE1F3+Awt YzFp71+UPOBYyqjPF4ZzUdRiGphhGniU/5taUynCE08Hf6SK6StynOlIRu7AK5Pbf7HaKNdjYXfvx iIuHmOGTWDzxk+sn20c1GR3yMpg6GZkcY94jexZf0Bs/mLq1VQYMJ73kg0Yo57uDtpXK+G8/cwhq9 tSmLWu9CmojpR8U6ROakNmlFz8gvunyeWMOHcHAer1d9mgiVpXEvb2uFIHK5zcwkLcr5V/GocsQYM 06gPmJWwfO6hXDJPYt/Di4DreIlTC2VojV+gFrmqxtW4gPBL/x9cOMKS+kyyoNo45pPDGAL8cuVG/ ba7uQn5Hw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwN-00074t-9I; Sun, 02 Aug 2020 14:26:19 +0000 Received: from mail-lj1-f195.google.com ([209.85.208.195]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwC-0006zF-Eh; Sun, 02 Aug 2020 14:26:09 +0000 Received: by mail-lj1-f195.google.com with SMTP id v9so2518269ljk.6; Sun, 02 Aug 2020 07:26:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SHzQyIKtZT048lWcLoYtmM5+43kERVs82uFH/nxs4dE=; b=k2pcYRi+7E7uW442xq2GYSdDfs0TsfdKvFMqjbJNJZD4wwimV9HO3QuRddXwHTtMaq x4DMQezplxBD6H5g7pPZDPAFLvRJBMt/ugCmGi6BNPXMvZpXvCSSHrDL/Et//h48gMKq lJ6FzoAKjj+VXDeqRI9Pn0xaR+pX/FHaA8krA43XvlRFtAY5x2jiOc5q7JzeAZdbgIOc ShWqFe9w22Om7/mS6pad6S/Evp6oQxLbiKBxjEhMNY9qnhISjrcGd6R8GsHd/lYcf5VJ FfYbwEK3GmKtwGHKOgIhDMTJSjLgz3fnZFCaynbD7Tg4AYuYAO2twtVbGZm+qmyflwHs EsPg== X-Gm-Message-State: AOAM531Zgo7HuEJ5eTonpSuHm95/3YiZokdO3Tr94fuk8YlCA/zfBIy/ /BBXugWzpzmDrjp5T6nTILw= X-Google-Smtp-Source: ABdhPJw9KYywa8ZVGNdkCZs9dJSVD2eLeBxLICm3DHiWvDH9oOY7/rpOjkFQkoP+VW0PAFb9uso9fw== X-Received: by 2002:a2e:9dd3:: with SMTP id x19mr2085928ljj.459.1596378365310; Sun, 02 Aug 2020 07:26:05 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id 193sm4214136lfa.90.2020.08.02.07.26.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 07:26:04 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Subject: [PATCH 01/10] PCI: dwc: Remove dev_err() when handing an error from platform_get_irq() Date: Sun, 2 Aug 2020 14:25:53 +0000 Message-Id: <20200802142601.1635926-2-kw@linux.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200802142601.1635926-1-kw@linux.com> References: <20200802142601.1635926-1-kw@linux.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_102608_591821_960D1295 X-CRM114-Status: GOOD ( 16.11 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.195 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [kswilczynski[at]gmail.com] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.195 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , Binghui Wang , linux-arm-kernel@axis.com, Ley Foon Tan , Thomas Petazzoni , Toan Le , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Xiaowei Song , Hou Zhiqiang , Linus Walleij , Richard Zhu , Sascha Hauer , Yue Wang , Murali Karicheri , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jingoo Han , rfi@lists.rocketboards.org, Shawn Guo , Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. This change is as per suggestion from Coccinelle: drivers/pci/controller/dwc/pcie-armada8k.c:252:2-9: line 252 is redundant because platform_get_irq() already prints an error drivers/pci/controller/dwc/pcie-kirin.c:459:3-10: line 459 is redundant because platform_get_irq() already prints an error drivers/pci/controller/dwc/pci-imx6.c:872:3-10: line 872 is redundant because platform_get_irq() already prints an error drivers/pci/controller/dwc/pcie-artpec6.c:391:3-10: line 391 is redundant because platform_get_irq() already prints an error drivers/pci/controller/dwc/pcie-spear13xx.c:202:2-9: line 202 is redundant because platform_get_irq() already prints an error drivers/pci/controller/dwc/pci-keystone.c:1254:2-9: line 1254 is redundant because platform_get_irq() already prints an error drivers/pci/controller/dwc/pci-exynos.c:406:2-9: line 406 is redundant because platform_get_irq() already prints an error drivers/pci/controller/dwc/pci-exynos.c:419:3-10: line 419 is redundant because platform_get_irq() already prints an error drivers/pci/controller/dwc/pcie-tegra194.c:2193:2-9: line 2193 is redundant because platform_get_irq() already prints an error drivers/pci/controller/dwc/pcie-histb.c:406:3-10: line 406 is redundant because platform_get_irq() already prints an error drivers/pci/controller/dwc/pci-meson.c:492:3-10: line 492 is redundant because platform_get_irq() already prints an error drivers/pci/controller/dwc/pci-dra7xx.c:633:2-9: line 633 is redundant because platform_get_irq() already prints an error drivers/pci/controller/dwc/pci-dra7xx.c:875:2-9: line 875 is redundant because platform_get_irq() already prints an error Suggested-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński Acked-by: Jesper Nilsson --- drivers/pci/controller/dwc/pci-dra7xx.c | 8 ++------ drivers/pci/controller/dwc/pci-exynos.c | 9 +++------ drivers/pci/controller/dwc/pci-imx6.c | 4 +--- drivers/pci/controller/dwc/pci-keystone.c | 4 +--- drivers/pci/controller/dwc/pci-meson.c | 4 +--- drivers/pci/controller/dwc/pcie-armada8k.c | 4 +--- drivers/pci/controller/dwc/pcie-artpec6.c | 4 +--- drivers/pci/controller/dwc/pcie-histb.c | 4 +--- drivers/pci/controller/dwc/pcie-kirin.c | 5 +---- drivers/pci/controller/dwc/pcie-spear13xx.c | 5 ++--- drivers/pci/controller/dwc/pcie-tegra194.c | 4 +--- 11 files changed, 15 insertions(+), 40 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c index 6184ebc9392d..66465dd69858 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -629,10 +629,8 @@ static int __init dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx, struct resource *res; pp->irq = platform_get_irq(pdev, 1); - if (pp->irq < 0) { - dev_err(dev, "missing IRQ resource\n"); + if (pp->irq < 0) return pp->irq; - } ret = dra7xx_pcie_init_irq_domain(pp); if (ret < 0) @@ -871,10 +869,8 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev) pci->ops = &dw_pcie_ops; irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(dev, "missing IRQ resource: %d\n", irq); + if (irq < 0) return irq; - } base = devm_platform_ioremap_resource_byname(pdev, "ti_conf"); if (IS_ERR(base)) diff --git a/drivers/pci/controller/dwc/pci-exynos.c b/drivers/pci/controller/dwc/pci-exynos.c index c5043d951e80..f721fddc521e 100644 --- a/drivers/pci/controller/dwc/pci-exynos.c +++ b/drivers/pci/controller/dwc/pci-exynos.c @@ -402,10 +402,9 @@ static int __init exynos_add_pcie_port(struct exynos_pcie *ep, int ret; pp->irq = platform_get_irq(pdev, 1); - if (pp->irq < 0) { - dev_err(dev, "failed to get irq\n"); + if (pp->irq < 0) return pp->irq; - } + ret = devm_request_irq(dev, pp->irq, exynos_pcie_irq_handler, IRQF_SHARED, "exynos-pcie", ep); if (ret) { @@ -415,10 +414,8 @@ static int __init exynos_add_pcie_port(struct exynos_pcie *ep, if (IS_ENABLED(CONFIG_PCI_MSI)) { pp->msi_irq = platform_get_irq(pdev, 0); - if (pp->msi_irq < 0) { - dev_err(dev, "failed to get msi irq\n"); + if (pp->msi_irq < 0) return pp->msi_irq; - } } pp->ops = &exynos_pcie_host_ops; diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 8f08ae53f53e..aba0a1514a86 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -868,10 +868,8 @@ static int imx6_add_pcie_port(struct imx6_pcie *imx6_pcie, if (IS_ENABLED(CONFIG_PCI_MSI)) { pp->msi_irq = platform_get_irq_byname(pdev, "msi"); - if (pp->msi_irq < 0) { - dev_err(dev, "failed to get MSI irq\n"); + if (pp->msi_irq < 0) return pp->msi_irq; - } } pp->ops = &imx6_pcie_host_ops; diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index 790679fdfa48..99df9aeece1f 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -1250,10 +1250,8 @@ static int __init ks_pcie_probe(struct platform_device *pdev) pci->version = version; irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(dev, "missing IRQ resource: %d\n", irq); + if (irq < 0) return irq; - } ret = request_irq(irq, ks_pcie_err_irq_handler, IRQF_SHARED, "ks-pcie-error-irq", ks_pcie); diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c index ca59ba9e0ecd..4f183b96afbb 100644 --- a/drivers/pci/controller/dwc/pci-meson.c +++ b/drivers/pci/controller/dwc/pci-meson.c @@ -488,10 +488,8 @@ static int meson_add_pcie_port(struct meson_pcie *mp, if (IS_ENABLED(CONFIG_PCI_MSI)) { pp->msi_irq = platform_get_irq(pdev, 0); - if (pp->msi_irq < 0) { - dev_err(dev, "failed to get MSI IRQ\n"); + if (pp->msi_irq < 0) return pp->msi_irq; - } } pp->ops = &meson_pcie_host_ops; diff --git a/drivers/pci/controller/dwc/pcie-armada8k.c b/drivers/pci/controller/dwc/pcie-armada8k.c index 49596547e8c2..66ec21cd9487 100644 --- a/drivers/pci/controller/dwc/pcie-armada8k.c +++ b/drivers/pci/controller/dwc/pcie-armada8k.c @@ -248,10 +248,8 @@ static int armada8k_add_pcie_port(struct armada8k_pcie *pcie, pp->ops = &armada8k_pcie_host_ops; pp->irq = platform_get_irq(pdev, 0); - if (pp->irq < 0) { - dev_err(dev, "failed to get irq for port\n"); + if (pp->irq < 0) return pp->irq; - } ret = devm_request_irq(dev, pp->irq, armada8k_pcie_irq_handler, IRQF_SHARED, "armada8k-pcie", pcie); diff --git a/drivers/pci/controller/dwc/pcie-artpec6.c b/drivers/pci/controller/dwc/pcie-artpec6.c index 28d5a1095200..d429bd2b2406 100644 --- a/drivers/pci/controller/dwc/pcie-artpec6.c +++ b/drivers/pci/controller/dwc/pcie-artpec6.c @@ -387,10 +387,8 @@ static int artpec6_add_pcie_port(struct artpec6_pcie *artpec6_pcie, if (IS_ENABLED(CONFIG_PCI_MSI)) { pp->msi_irq = platform_get_irq_byname(pdev, "msi"); - if (pp->msi_irq < 0) { - dev_err(dev, "failed to get MSI irq\n"); + if (pp->msi_irq < 0) return pp->msi_irq; - } } pp->ops = &artpec6_pcie_host_ops; diff --git a/drivers/pci/controller/dwc/pcie-histb.c b/drivers/pci/controller/dwc/pcie-histb.c index 811b5c6d62ea..006437eadc31 100644 --- a/drivers/pci/controller/dwc/pcie-histb.c +++ b/drivers/pci/controller/dwc/pcie-histb.c @@ -402,10 +402,8 @@ static int histb_pcie_probe(struct platform_device *pdev) if (IS_ENABLED(CONFIG_PCI_MSI)) { pp->msi_irq = platform_get_irq_byname(pdev, "msi"); - if (pp->msi_irq < 0) { - dev_err(dev, "Failed to get MSI IRQ\n"); + if (pp->msi_irq < 0) return pp->msi_irq; - } } hipcie->phy = devm_phy_get(dev, "phy"); diff --git a/drivers/pci/controller/dwc/pcie-kirin.c b/drivers/pci/controller/dwc/pcie-kirin.c index c19617a912bd..2e0181ce6895 100644 --- a/drivers/pci/controller/dwc/pcie-kirin.c +++ b/drivers/pci/controller/dwc/pcie-kirin.c @@ -455,11 +455,8 @@ static int kirin_pcie_add_msi(struct dw_pcie *pci, if (IS_ENABLED(CONFIG_PCI_MSI)) { irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, - "failed to get MSI IRQ (%d)\n", irq); + if (irq < 0) return irq; - } pci->pp.msi_irq = irq; } diff --git a/drivers/pci/controller/dwc/pcie-spear13xx.c b/drivers/pci/controller/dwc/pcie-spear13xx.c index 7d0cdfd8138b..ad5d08d19926 100644 --- a/drivers/pci/controller/dwc/pcie-spear13xx.c +++ b/drivers/pci/controller/dwc/pcie-spear13xx.c @@ -198,10 +198,9 @@ static int spear13xx_add_pcie_port(struct spear13xx_pcie *spear13xx_pcie, int ret; pp->irq = platform_get_irq(pdev, 0); - if (pp->irq < 0) { - dev_err(dev, "failed to get irq\n"); + if (pp->irq < 0) return pp->irq; - } + ret = devm_request_irq(dev, pp->irq, spear13xx_pcie_irq_handler, IRQF_SHARED | IRQF_NO_THREAD, "spear1340-pcie", spear13xx_pcie); diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c index 92b77f7d8354..70498689d0c0 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -2189,10 +2189,8 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev) } pp->irq = platform_get_irq_byname(pdev, "intr"); - if (pp->irq < 0) { - dev_err(dev, "Failed to get \"intr\" interrupt\n"); + if (pp->irq < 0) return pp->irq; - } pcie->bpmp = tegra_bpmp_get(dev); if (IS_ERR(pcie->bpmp)) From patchwork Sun Aug 2 14:25:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 11696507 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9090214E3 for ; Sun, 2 Aug 2020 14:28:15 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67E6720759 for ; Sun, 2 Aug 2020 14:28:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rKUus79Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67E6720759 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Y4OOJpfe22MJ2HpZlE874oz788jl2jn3XDxwdFeLi/k=; b=rKUus79QCPgFRJ/EAoHGk4rXT NB2gLzw4d/fwrK/vFQns2NNMqcX6R1zh/idBv4dJ2Wv6vxl8h4tuyRPqR2QCLDbNs8/jAm9p9qE9p TPjI+mTR7B7KBGUDRv9Ifb6ZrEpjuEpHdfCkrBFGuGu6BTaAa8DKc2cOiQim1jMy03kRj134LzxwA am0tVSbZ/OQcXihjBEcRBqBAKV8efZrdh4v93XJj0mCni3lFPdMRB1sASCAXypB8pWzpJ1emlF4/p tS/jS3faPoU0gUc5PWECHAzE60UxwVxP4RfWM+aFDCuKB6C6Tgudu8rK32jyVu/fAnRmwKV1LBY6v X4rSy8xtg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwQ-00076L-IW; Sun, 02 Aug 2020 14:26:22 +0000 Received: from mail-lj1-f196.google.com ([209.85.208.196]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwC-0006zI-Gz; Sun, 02 Aug 2020 14:26:09 +0000 Received: by mail-lj1-f196.google.com with SMTP id v4so27328565ljd.0; Sun, 02 Aug 2020 07:26:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Gfkhr1q1ggPu0YMrYNRyEFtEoT09pWjfvzSHRK7KszI=; b=ZU7mUvS721uGpb2SPPOsPDB5XhUPBBKGqFcnBmjZZ1GKKNB8BXTfRsey2BjovktFOh wPbBEzDUzEuFOh16QpfW8/EJuoj/c3+XhIRwy+TqyV2SdyJhWk/rrra33gMLOsqZf5GR g1FpObtWgKIfHB/f4Lvd4olXtE+gLKjmTShwPJb1hauLttyyCkIyPwLQ1yMs8ZuAeyj9 py5VtbfuhMIIzwN/4VamxZZr0OW/RI+1XSzENjYWTk+N5hzqVVm42j2A3pv8N/H7oY8p rYETCIdo/+HZ6lYLQfDgikc/XzSnmcluTRDaBFom7eBHJrnevvxtbdRLC3IY39lh/c33 gycw== X-Gm-Message-State: AOAM533Pgnj527K+V9J4WqGFJKkFFbPqI4wJewmsWzMwDwg1AYu/PvPs 69aC+sUZfej7PeVDpA7VY+w= X-Google-Smtp-Source: ABdhPJwj8NNsaKX276AKW3jAXsmsgaGQgCsO/u2y94Zh7oXKJWpdLXn5GIGobnMNMMKuZhl66j8/uw== X-Received: by 2002:a2e:9d04:: with SMTP id t4mr5607399lji.184.1596378366828; Sun, 02 Aug 2020 07:26:06 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id 193sm4214136lfa.90.2020.08.02.07.26.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 07:26:06 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Subject: [PATCH 02/10] PCI: mobiveil: Remove dev_err() when handing an error from platform_get_irq() Date: Sun, 2 Aug 2020 14:25:54 +0000 Message-Id: <20200802142601.1635926-3-kw@linux.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200802142601.1635926-1-kw@linux.com> References: <20200802142601.1635926-1-kw@linux.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_102608_640421_0A8BAD30 X-CRM114-Status: GOOD ( 16.08 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.196 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.196 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [kswilczynski[at]gmail.com] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , Binghui Wang , linux-arm-kernel@axis.com, Ley Foon Tan , Thomas Petazzoni , Toan Le , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Xiaowei Song , Hou Zhiqiang , Linus Walleij , Richard Zhu , Sascha Hauer , Yue Wang , Murali Karicheri , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jingoo Han , rfi@lists.rocketboards.org, Shawn Guo , Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. This change is as per suggestion from Coccinelle: drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c:174:2-9: line 174 is redundant because platform_get_irq() already prints an error drivers/pci/controller/mobiveil/pcie-mobiveil-host.c:526:2-9: line 526 is redundant because platform_get_irq() already prints an error Suggested-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński --- drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c | 5 ++--- drivers/pci/controller/mobiveil/pcie-mobiveil-host.c | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c b/drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c index a6d2190a6753..ee0156921ebc 100644 --- a/drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c +++ b/drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c @@ -170,10 +170,9 @@ static int ls_pcie_g4_interrupt_init(struct mobiveil_pcie *mv_pci) int ret; pcie->irq = platform_get_irq_byname(pdev, "intr"); - if (pcie->irq < 0) { - dev_err(dev, "Can't get 'intr' IRQ, errno = %d\n", pcie->irq); + if (pcie->irq < 0) return pcie->irq; - } + ret = devm_request_irq(dev, pcie->irq, ls_pcie_g4_isr, IRQF_SHARED, pdev->name, pcie); if (ret) { diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c index 5907baa9b1f2..fa321fcdd4bc 100644 --- a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c @@ -522,10 +522,8 @@ static int mobiveil_pcie_integrated_interrupt_init(struct mobiveil_pcie *pcie) mobiveil_pcie_enable_msi(pcie); rp->irq = platform_get_irq(pdev, 0); - if (rp->irq < 0) { - dev_err(dev, "failed to map IRQ: %d\n", rp->irq); + if (rp->irq < 0) return rp->irq; - } /* initialize the IRQ domains */ ret = mobiveil_pcie_init_irq_domain(pcie); From patchwork Sun Aug 2 14:25:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 11696511 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9240513B6 for ; Sun, 2 Aug 2020 14:28:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5827D20759 for ; Sun, 2 Aug 2020 14:28:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xg5Yc9Wr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5827D20759 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+fTVTmvAltcCenpRp3TD7Lt3aEtr4+qknECZoKC8MB4=; b=Xg5Yc9Wrk6bbJxuYWhj/DPqv8 ac/51irwOXNJcBfEOqmC3WDNVXC+Bfm/FEqj8+1IbytSL/QvoqjVzkWSd3P7rQxX3InGcJHOk7a1N 5OttoFoi0rygsDBsBch0tZh2V4pW2jMLwHyVz0rtuQO1uWc9kjnntq4cS3hBO3NiOw3V5sUTM8Tig H7xx8X2OP7r7opbr+wmRr7vFJjdX/qgc8pSpGIKSgpp6f2MqLLXgsFYOU8x5z8no1bw4CqvKwDf0z OG+yKm/xyF9jucbTinx41t0GkSuKERoqeoE9V7K+6ILj/jCFXQQMSmanhiEBo74i0zRzvQl8N0q1h KMYV7Q/aw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwU-00078A-5e; Sun, 02 Aug 2020 14:26:26 +0000 Received: from mail-lj1-f195.google.com ([209.85.208.195]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwD-000700-El; Sun, 02 Aug 2020 14:26:10 +0000 Received: by mail-lj1-f195.google.com with SMTP id h19so36998891ljg.13; Sun, 02 Aug 2020 07:26:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VMzZQXjK0WMetVDGn0tUCy2JU8NUEkR2xnKheZa8ZWc=; b=OSgURStQtUQawkO0yRIaxPFakz61bVO4ToxEiY0hhEGuv5T2qkSdLJ4BN5o6F6KM+o wWQFYnElBltBJOGvjLQEG8mb2JDScsTdYL+lO0kOe73f40Lqglqe34eqHh1NuOLAAuDL c1vt+Kvb3ASXll2dpwJ4IYcOUN9f1E3+hJrC8cTzdKWOtvXeDaSPNpjSds9bXfjj0+xh EN2DS/vouri0gKrs4onrMou62ywKavrTSt78q3x6qRDnurUE9mg2vDKy6UsAFdIj4Ti/ eCGXlJNyYrWFCjFJssqZUsghFeTgRndLQY4+P/XExpaiHFJr6ZpSKeebYfZXTCiogEA7 u9GQ== X-Gm-Message-State: AOAM531ZJCsY9XgC7Zglo170wm5Ozo0vvWY9j21zxGtDT6DHB2BhMVVB oYHL8hCg7bEI08ZkoIb5+Rs= X-Google-Smtp-Source: ABdhPJyjgrQc0FDjQcMFVZPpVkua7bA294ZwM5k/dH6lFvq8PdcJNGDDSetrLxIi93uNdb0Ai2zdVg== X-Received: by 2002:a2e:752:: with SMTP id i18mr6183911ljd.428.1596378368431; Sun, 02 Aug 2020 07:26:08 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id 193sm4214136lfa.90.2020.08.02.07.26.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 07:26:07 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Subject: [PATCH 03/10] PCI: tegra: Remove dev_err() when handing an error from platform_get_irq() Date: Sun, 2 Aug 2020 14:25:55 +0000 Message-Id: <20200802142601.1635926-4-kw@linux.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200802142601.1635926-1-kw@linux.com> References: <20200802142601.1635926-1-kw@linux.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_102609_531237_B3A9B506 X-CRM114-Status: GOOD ( 15.32 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.195 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.195 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [kswilczynski[at]gmail.com] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , Binghui Wang , linux-arm-kernel@axis.com, Ley Foon Tan , Thomas Petazzoni , Toan Le , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Xiaowei Song , Hou Zhiqiang , Linus Walleij , Richard Zhu , Sascha Hauer , Yue Wang , Murali Karicheri , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jingoo Han , rfi@lists.rocketboards.org, Shawn Guo , Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. This change is as per suggestion from Coccinelle: drivers/pci/controller/pci-tegra.c:1524:2-9: line 1524 is redundant because platform_get_irq() already prints an error drivers/pci/controller/pci-tegra.c:1742:2-9: line 1742 is redundant because platform_get_irq() already prints an error Suggested-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński --- drivers/pci/controller/pci-tegra.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c index 235b456698fc..b11397475a4d 100644 --- a/drivers/pci/controller/pci-tegra.c +++ b/drivers/pci/controller/pci-tegra.c @@ -1520,10 +1520,8 @@ static int tegra_pcie_get_resources(struct tegra_pcie *pcie) /* request interrupt */ err = platform_get_irq_byname(pdev, "intr"); - if (err < 0) { - dev_err(dev, "failed to get IRQ: %d\n", err); + if (err < 0) goto phys_put; - } pcie->irq = err; @@ -1738,10 +1736,8 @@ static int tegra_pcie_msi_setup(struct tegra_pcie *pcie) } err = platform_get_irq_byname(pdev, "msi"); - if (err < 0) { - dev_err(dev, "failed to get IRQ: %d\n", err); + if (err < 0) goto free_irq_domain; - } msi->irq = err; From patchwork Sun Aug 2 14:25:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 11696473 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD54F912 for ; Sun, 2 Aug 2020 14:26:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 965692075A for ; Sun, 2 Aug 2020 14:26:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="zqEm8v73" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 965692075A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+etZjEE6x0PuxXOhuGJekSCNT2Nh3lj1VMp7Hunbgpg=; b=zqEm8v73RhjzpAnT4FlhePF5+ 0N1ffHBZHcl9EQOwAiUpYAFOaasKcFnjOZNAQV9e9GZHXaDm2pXdGjZSBRe4KmH+v3TYSNz2FK7XW nIIGp0UCeavVG8X4RljjbMTMF5mBWOHDJ5G8khZOE6j6OHv6Q7WfDFMrEriuYe3qQabnaWemjjkP9 CwZ55KuEqZRNcaYJ5YXvA04TXayXc5klf8I1Ivn4sdPQGSD6dmB0iVMJqkRucEYEmruxpOzZhHNpi /z5lCdNKJGPoI6VB0Us77w6dk6W0R3nkFVg144lqBte3THlLpTBmcYJHL6aXdm7sdxUYa8uBPokkf 4aZF4aACQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwY-0007Ag-L0; Sun, 02 Aug 2020 14:26:30 +0000 Received: from mail-lj1-f195.google.com ([209.85.208.195]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwF-00070p-3N; Sun, 02 Aug 2020 14:26:12 +0000 Received: by mail-lj1-f195.google.com with SMTP id w14so7157011ljj.4; Sun, 02 Aug 2020 07:26:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vqz66jFdWkrqKdTPiLpnKqTLTv8a5tORVk+kvNATVNQ=; b=iSRz5veQ0xfSS79fi2c88mcCi6Tbz5+rOtKpBgb6O54WBpTfzBK0eyMQ4xJ4zD1qmx l+X341ypTSwFBhw/yyAkdcJGjqfsEFOItlBI9Vsn+DZUCeutAS3fG9DjkHcd323P6oeF C6mPmkYWIAQBr32eIwVYnqVWGhEDPs+Ghi8emEj/HP/+Lcbc1v/CBrutnRgxM0UGOGMY M1D8BlQvYM4FihE925OWhPiMltJBk0LloZnLW2jp8xDJjprqv5r0Eb2GvNl33JHlTCF1 imQzVCN0xeKtJLMQBPrd7EJIM+g4VF2e/71SVFIhvBFrodJ72hA3J+o7GKOZtABG4hXF csPA== X-Gm-Message-State: AOAM531X0uww7R31AQVVJfy4BFjzh85h/4ve12x0SVvVJypLhr/Cq0Bb +qrGdMGhdOEbkJ87IyCvVl8= X-Google-Smtp-Source: ABdhPJy4jSVIiW6PUqWFPiMQhKNWAsiM5j0yMAxbx3OUXIJ59hEmi0ME2i3lZ+iAJfoiqC9jsw91kA== X-Received: by 2002:a2e:85d1:: with SMTP id h17mr4003308ljj.341.1596378369981; Sun, 02 Aug 2020 07:26:09 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id 193sm4214136lfa.90.2020.08.02.07.26.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 07:26:09 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Subject: [PATCH 04/10] PCI: altera: Remove dev_err() when handing an error from platform_get_irq() Date: Sun, 2 Aug 2020 14:25:56 +0000 Message-Id: <20200802142601.1635926-5-kw@linux.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200802142601.1635926-1-kw@linux.com> References: <20200802142601.1635926-1-kw@linux.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_102611_248843_0A39C446 X-CRM114-Status: GOOD ( 14.95 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.195 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.195 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [kswilczynski[at]gmail.com] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , Binghui Wang , linux-arm-kernel@axis.com, Ley Foon Tan , Thomas Petazzoni , Toan Le , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Xiaowei Song , Hou Zhiqiang , Linus Walleij , Richard Zhu , Sascha Hauer , Yue Wang , Murali Karicheri , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jingoo Han , rfi@lists.rocketboards.org, Shawn Guo , Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. This change is as per suggestion from Coccinelle: drivers/pci/controller/pcie-altera.c:717:2-9: line 717 is redundant because platform_get_irq() already prints an error Suggested-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński Reviewed-by: Ley Foon Tan --- drivers/pci/controller/pcie-altera.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pci/controller/pcie-altera.c b/drivers/pci/controller/pcie-altera.c index 24cb1c331058..f6d73d282230 100644 --- a/drivers/pci/controller/pcie-altera.c +++ b/drivers/pci/controller/pcie-altera.c @@ -713,10 +713,8 @@ static int altera_pcie_parse_dt(struct altera_pcie *pcie) /* setup IRQ */ pcie->irq = platform_get_irq(pdev, 0); - if (pcie->irq < 0) { - dev_err(dev, "failed to get IRQ: %d\n", pcie->irq); + if (pcie->irq < 0) return pcie->irq; - } irq_set_chained_handler_and_data(pcie->irq, altera_pcie_isr, pcie); return 0; From patchwork Sun Aug 2 14:25:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 11696509 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1092E13B6 for ; Sun, 2 Aug 2020 14:28:17 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DEABB20759 for ; Sun, 2 Aug 2020 14:28:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wKm26sML" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DEABB20759 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=n99NcNH5ILDTmLoORH8W0YyToBtp/KPgtUg9F5bGUag=; b=wKm26sML9TSDmZi9h7Y15rUNL DCcKypugwzzKvsN8kciX8PkZhdGyoCcxdKNVTZ9oaatf+/KgILKrP3wiHQx0oa+T+/iSzmZBqIPlx cVspmmJOQd21ukIfmnwl381hxKmHk/QmSuLDgh2amPOMdu62QpIMngq7q/rwzrbuFHyxjczpA2fGI +bmUY2+HfdrMTwD3O800YBLtAaxpDXOw4PLOB0M7MPdlv1GSCq1rJLfyfwNgiqz+uXY/owd4y6xgL v+UIlyYxEKTtHyNuX9plYaszy4AMz6u0nQnl73v9XUtg6G9r8dAUto402KpvmOnshqpARzLD+oXav YlvQ+kakQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Ewh-0007Fj-Qj; Sun, 02 Aug 2020 14:26:40 +0000 Received: from mail-lj1-f195.google.com ([209.85.208.195]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwG-00071j-HM; Sun, 02 Aug 2020 14:26:13 +0000 Received: by mail-lj1-f195.google.com with SMTP id g6so24376964ljn.11; Sun, 02 Aug 2020 07:26:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eygfm9r/GaNHVAKMUv8+SfoTHGAl/cjm4d2m8xjT5bc=; b=YhZTNdRfqOrP4Cpw2Y+OX5TMwxqpQLbKCh9MtohEuVDJaqxGSqYTFoMBD1N+4Yhfcx PZOAqGlIj+OhaittUtTyBkdXR4rhU50Mb4pgkpV5N64C2P+IP6zGnQ0ACCmkWoJbtJjx 0q0FQ8dk7ffFpIVGRLHfPbz9Z6q49Z5a1dZ64qPhdvA/HfcP+ZAYZN0UqH02ndFODAFo K5wKzH4jf962yWhaZ5jr8EL0Dri5VGYGoyOV5Vapivf0mrLDXW9BrCHHjhvGW5BbyAH2 ENoZtjmJhNIDotecP9jVVpjw8rt/lBmOX1EdgZmOboDspIpKkLSgzCn3jOWYkAIJQSpf lnSA== X-Gm-Message-State: AOAM530v5+jlhrQPGHovw8nMSZPnGI0prQNd96+KMqaAhzBuNxPu2YUK 1zebrfjpktcG7So7GdpBt3w= X-Google-Smtp-Source: ABdhPJzSmhttbDUgORpKlM914FzAS2b2KYbghno6w3+rxNJphXxD2jUo/xd+iwrLQer40nK+OI29Pw== X-Received: by 2002:a05:651c:31b:: with SMTP id a27mr5541281ljp.455.1596378371517; Sun, 02 Aug 2020 07:26:11 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id 193sm4214136lfa.90.2020.08.02.07.26.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 07:26:11 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Subject: [PATCH 05/10] PCI: host-generic: Remove dev_err() when handing an error from platform_get_irq() Date: Sun, 2 Aug 2020 14:25:57 +0000 Message-Id: <20200802142601.1635926-6-kw@linux.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200802142601.1635926-1-kw@linux.com> References: <20200802142601.1635926-1-kw@linux.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_102612_707789_777356A6 X-CRM114-Status: GOOD ( 14.77 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.195 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.195 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [kswilczynski[at]gmail.com] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , Binghui Wang , linux-arm-kernel@axis.com, Ley Foon Tan , Thomas Petazzoni , Toan Le , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Xiaowei Song , Hou Zhiqiang , Linus Walleij , Richard Zhu , Sascha Hauer , Yue Wang , Murali Karicheri , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jingoo Han , rfi@lists.rocketboards.org, Shawn Guo , Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. This change is as per suggestion from Coccinelle: drivers/pci/controller/pcie-tango.c:277:2-9: line 277 is redundant because platform_get_irq() already prints an error Suggested-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński --- drivers/pci/controller/pcie-tango.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pci/controller/pcie-tango.c b/drivers/pci/controller/pcie-tango.c index 8f640c70f936..d093a8ce4bb1 100644 --- a/drivers/pci/controller/pcie-tango.c +++ b/drivers/pci/controller/pcie-tango.c @@ -273,10 +273,8 @@ static int tango_pcie_probe(struct platform_device *pdev) writel_relaxed(0, pcie->base + SMP8759_ENABLE + offset); virq = platform_get_irq(pdev, 1); - if (virq < 0) { - dev_err(dev, "Failed to map IRQ\n"); + if (virq < 0) return virq; - } irq_dom = irq_domain_create_linear(fwnode, MSI_MAX, &dom_ops, pcie); if (!irq_dom) { From patchwork Sun Aug 2 14:25:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 11696515 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 54B1B912 for ; Sun, 2 Aug 2020 14:28:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2B8F120759 for ; Sun, 2 Aug 2020 14:28:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BgBdnwZt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B8F120759 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0JKQbbI+g0bNUMECNNCa97O49qgitQkqiiC2QD4cWOE=; b=BgBdnwZtfuVujSqtjcwapq8fS 4vchSs03A23XQexOwD3GI8ydMCUqeSBZL++16rJP8e/qu0mJw02+RJ42Cvqfk0HL/xpRObUNeAP90 H/IULuld6HzmjE3WU2FYB4P5st+tx9uMkRAviqUbI+XeQaCca3gKtUi/ts8RbjurXeGlxtvL9aX7b +AcD9jHBhpORVHtbP9ID96YFh2G0FPWsGIlBTVJy9iHLC11yRTesmUJnu9nACIh0lyzSbnVJqyfFW Zj5ITyjCb/bzbAVk19INHLqojXFJwpPotoieYbCa13Zp2INToNvRB4xU8ZOIZzDV6Jfqtfq4JGQ8B 2Aq6GS8pA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Ex1-0007NJ-RH; Sun, 02 Aug 2020 14:27:00 +0000 Received: from mail-lj1-f194.google.com ([209.85.208.194]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwI-00072G-Ly; Sun, 02 Aug 2020 14:26:15 +0000 Received: by mail-lj1-f194.google.com with SMTP id w14so7157100ljj.4; Sun, 02 Aug 2020 07:26:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B3KSoQD71byHkg+Qsnb1jzju+E/FIRrV3OAj8SbgT+c=; b=s34FRS5CC7hNxD9+EskX12iL4xgzKNlJzpy+nbtTUOQxO8EWLJsXRL0RLiwE/tlzam 2KBUflJAqTWaG4MuDX6R49jlpK5gLeHl46I37Zh5Ly4WLVrrAO6JW6uPzTRG8XZf8mfI tEu5RKffr+ea23LdFdgW+ObbUmJ4AmDR2MYGysIn7mAlFMr9l7hJ8vBSd9Iun4VCuIgx VjXF0+LrFShVKp2VOUeo86otQijmEmtc4ZB1uudBU6MWkw5iL7P3TLiLOPlLkrU4VGgZ CtzOkPHQvutwqomO/We88U4HuprOQFbkObZNnKAst9gh/y37X/ldqYPs1Oud3lat1nOi KJxQ== X-Gm-Message-State: AOAM532Sl5UdeGRMVVqlaMUgQBWsoaWbex6f1IeceKQa5Tn/sKpf8HGL kThXVaAVCYK/UOGPNunEoew= X-Google-Smtp-Source: ABdhPJy+xlZ4x5ScpsArHy4QaEW+arFDZ4OILOPVHDYUlBaUmY+RMdxu/xscCf5AhzmdVlScycAYuQ== X-Received: by 2002:a2e:9bc1:: with SMTP id w1mr6140877ljj.288.1596378373175; Sun, 02 Aug 2020 07:26:13 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id 193sm4214136lfa.90.2020.08.02.07.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 07:26:12 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Subject: [PATCH 06/10] PCI: v3-semi: Remove dev_err() when handing an error from platform_get_irq() Date: Sun, 2 Aug 2020 14:25:58 +0000 Message-Id: <20200802142601.1635926-7-kw@linux.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200802142601.1635926-1-kw@linux.com> References: <20200802142601.1635926-1-kw@linux.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_102614_811427_8C872222 X-CRM114-Status: GOOD ( 14.60 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.194 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [kswilczynski[at]gmail.com] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.194 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , Binghui Wang , linux-arm-kernel@axis.com, Ley Foon Tan , Thomas Petazzoni , Toan Le , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Xiaowei Song , Hou Zhiqiang , Linus Walleij , Richard Zhu , Sascha Hauer , Yue Wang , Murali Karicheri , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jingoo Han , rfi@lists.rocketboards.org, Shawn Guo , Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. This change is as per suggestion from Coccinelle: drivers/pci/controller/pci-v3-semi.c:781:2-9: line 781 is redundant because platform_get_irq() already prints an error Suggested-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński --- drivers/pci/controller/pci-v3-semi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/pci-v3-semi.c b/drivers/pci/controller/pci-v3-semi.c index 3681e5af3878..2a19f2a98945 100644 --- a/drivers/pci/controller/pci-v3-semi.c +++ b/drivers/pci/controller/pci-v3-semi.c @@ -777,10 +777,9 @@ static int v3_pci_probe(struct platform_device *pdev) /* Get and request error IRQ resource */ irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(dev, "unable to obtain PCIv3 error IRQ\n"); + if (irq < 0) return irq; - } + ret = devm_request_irq(dev, irq, v3_irq, 0, "PCIv3 error", v3); if (ret < 0) { From patchwork Sun Aug 2 14:25:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 11696513 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EEBD013B6 for ; Sun, 2 Aug 2020 14:28:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C78B320759 for ; Sun, 2 Aug 2020 14:28:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bz92JDD+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C78B320759 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TRxFT5osnsuBUPOOHKE4aF474m/ulCVK7LXHOr2uPIQ=; b=bz92JDD+THvqsVn5+VBcC2AMB g88jVV06vz0xowR5VoIKPl+n08g+rjndF02HCRs8e5XiLEYt0vmxNqr84qPNAm/9grImMjwP8+qtO U3+IE7+p1hvr2qrUe1ULfyw7Za8dCSam4ZH3nNpqniuDtBD6YIH3JkLx9FtZUOydx6dJgmIbdXMIJ g/qx4qTZ8pHX8Yua9w2zjeS6D0L1E3A0JKyPItSAoMmdLHlr0po/yTada2CFX5I7NJMr2wy+w1R/0 N1APqiJyWWRj3GlQHNyj/ASR22uWn8xUQYGNgwMZst7HwKkwN5koVtiTkXYiiRJl9AJj2b7IRKjBR GQ3XzVvLw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2ExA-0007YL-6V; Sun, 02 Aug 2020 14:27:08 +0000 Received: from mail-lf1-f65.google.com ([209.85.167.65]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwK-000736-BC; Sun, 02 Aug 2020 14:26:17 +0000 Received: by mail-lf1-f65.google.com with SMTP id 140so19147045lfi.5; Sun, 02 Aug 2020 07:26:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VHFVVkyvJ26w5l6BjSHc4G0RPe7rT9aQTvdBpCkShCw=; b=PTvu1g3I59nz0fuTktyxAtUZIEyMNIwZSigVayXMWu5ORjUYfyH1EVS2l7c4bZ2UI3 P7y09hsGWYQ02VCNSb5C1EG3vAI1MDu1UiaIzXLxZ2WiFGo4ejT8q3yWn3DU+B5ItKWl AAiSpwCP9IEWRTrWyatUwogbKcckLuK42q0m8/EIqNpUJaNT1qSPo0uBf/3S11WgnuQj oMVx68k3Ow21xn3FdGuk/zhaHwnkuyTxiy7XJmLRvBhNkBwFoGlppEzDL+JUt2NOmv7i uQ3SMHNIxn13AkNOu8pCXbBgtaYOYKMWmAfuBrBN6X2OJFKAPsumCtC8mvLeTFXcnYSO Qj4A== X-Gm-Message-State: AOAM5322IYbFIKKB/KZghmmxAXZIRVF/KEtrwK2drzuce9HDV14X6MR0 jspggkKyRHzqFrMsh7lkQJE= X-Google-Smtp-Source: ABdhPJxe9uClF4yn8tZcunRWtxDlWuh9tR86znz+TOBPok/VIIe5Df/vBtq17m7kMyjbPjEFliar6Q== X-Received: by 2002:ac2:5933:: with SMTP id v19mr6202139lfi.94.1596378374688; Sun, 02 Aug 2020 07:26:14 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id 193sm4214136lfa.90.2020.08.02.07.26.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 07:26:14 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Subject: [PATCH 07/10] PCI: altera-msi: Remove dev_err() when handing an error from platform_get_irq() Date: Sun, 2 Aug 2020 14:25:59 +0000 Message-Id: <20200802142601.1635926-8-kw@linux.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200802142601.1635926-1-kw@linux.com> References: <20200802142601.1635926-1-kw@linux.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_102616_454693_9FCE3540 X-CRM114-Status: GOOD ( 14.80 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.65 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.65 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [kswilczynski[at]gmail.com] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , Binghui Wang , linux-arm-kernel@axis.com, Ley Foon Tan , Thomas Petazzoni , Toan Le , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Xiaowei Song , Hou Zhiqiang , Linus Walleij , Richard Zhu , Sascha Hauer , Yue Wang , Murali Karicheri , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jingoo Han , rfi@lists.rocketboards.org, Shawn Guo , Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. This change is as per suggestion from Coccinelle: drivers/pci/controller/pcie-altera-msi.c:259:2-9: line 259 is redundant because platform_get_irq() already prints an error Suggested-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński --- drivers/pci/controller/pcie-altera-msi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/controller/pcie-altera-msi.c b/drivers/pci/controller/pcie-altera-msi.c index 16d938920ca5..bec666eda1eb 100644 --- a/drivers/pci/controller/pcie-altera-msi.c +++ b/drivers/pci/controller/pcie-altera-msi.c @@ -256,7 +256,6 @@ static int altera_msi_probe(struct platform_device *pdev) msi->irq = platform_get_irq(pdev, 0); if (msi->irq < 0) { - dev_err(&pdev->dev, "failed to map IRQ: %d\n", msi->irq); ret = msi->irq; goto err; } From patchwork Sun Aug 2 14:26:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 11696519 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7620013B6 for ; Sun, 2 Aug 2020 14:29:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4F17620759 for ; Sun, 2 Aug 2020 14:29:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TccBJ8Y9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F17620759 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OBnW6WOdaYsTYkrt/+CVaGnpu+cNFfBSR04BoKy3rGM=; b=TccBJ8Y9mJFsyWEOB5STytVKW XdEFPrSnSUDs2+/ZSuKvGrXiIadn8tjcC0DK27636rLWmadOSRGfAwe/M/BfiJ3i4F5QTan9uyCYM L5buQXdlvcISxxE99dWobUxnu+ACQoaOBT3TzRG/2uDYoCTXmZcJZHXjYCJaDMi+++rq33rSC8kCw Liin0a/frq6y+pOHbcEt+CwsfGGuScm5meJdcMAonEHFNYz1aI6o9N4H8xoeWZevizX9/prMsP164 NE4feIgu88Zo3Jpy9z5pXmLX5uFSnmoinNhrJYXvxBcCQxtWlelgQenoBHGItU8Q4y/QQ+6AuQdnO Y0bzU13mw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2ExI-0007ca-Sy; Sun, 02 Aug 2020 14:27:16 +0000 Received: from mail-lj1-f195.google.com ([209.85.208.195]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwL-00073p-Ie; Sun, 02 Aug 2020 14:26:18 +0000 Received: by mail-lj1-f195.google.com with SMTP id w14so7157189ljj.4; Sun, 02 Aug 2020 07:26:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KctYFubeJoKLzzl613htWFeciTcF38lRZu1u0/Rl6M8=; b=RiwP7NOMnE5Q0pf5Y5GnckOZPIWdXVZ1KVaxHLEfFZ8YnZocpU3QsdcBkVLYojorzP 5+lhO/1mQkv3cwfQhhaR5XRDLCdKjh1ECTPtQ1cNTtWxBXT/wu0GP7pOv1qn2XfZ8BaI pJ29RJJms5sWQVEmEG5bqKbrLW6trwjNbTwDmM+g8ekRyuMUoOt5JzpD8SHu+ubXOdSI akM+c7Q2fsF4lfPzMD+edIwj+t/GkoTlDpBMzPNU0A4gn5LuiyxC2WwXE1mSODp2RfDX 2ABcPZX1B48CpIMESeBQPkPs8ZwW0e0eNX9JqktamDFYGBGB5wVEtoKIrbzC4CZZV473 qfsw== X-Gm-Message-State: AOAM530V5BAEGRmun1C+p16MiULad8rHuD1to+T/HUDWksv8PrT8UDzt OQ3Aw2EpsKx8dDpXapwSVP0= X-Google-Smtp-Source: ABdhPJzMcdshNqp2FVaeIW1qGszgg8tWQnvrwe+GCIZdRiYp+tWne0ejZ4gesGSqeO7GvTac2I4drw== X-Received: by 2002:a2e:9e89:: with SMTP id f9mr5229933ljk.212.1596378376233; Sun, 02 Aug 2020 07:26:16 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id 193sm4214136lfa.90.2020.08.02.07.26.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 07:26:15 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Subject: [PATCH 08/10] PCI: xgene-msi: Remove dev_err() when handing an error from platform_get_irq() Date: Sun, 2 Aug 2020 14:26:00 +0000 Message-Id: <20200802142601.1635926-9-kw@linux.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200802142601.1635926-1-kw@linux.com> References: <20200802142601.1635926-1-kw@linux.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_102617_737676_A86A99F7 X-CRM114-Status: GOOD ( 14.10 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.195 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.195 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [kswilczynski[at]gmail.com] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , Binghui Wang , linux-arm-kernel@axis.com, Ley Foon Tan , Thomas Petazzoni , Toan Le , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Xiaowei Song , Hou Zhiqiang , Linus Walleij , Richard Zhu , Sascha Hauer , Yue Wang , Murali Karicheri , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jingoo Han , rfi@lists.rocketboards.org, Shawn Guo , Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. This change is as per suggestion from Coccinelle: drivers/pci/controller/pci-xgene-msi.c:481:3-10: line 481 is redundant because platform_get_irq() already prints an error Suggested-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński --- drivers/pci/controller/pci-xgene-msi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pci/controller/pci-xgene-msi.c b/drivers/pci/controller/pci-xgene-msi.c index f4c02da84e59..02271c6d17a1 100644 --- a/drivers/pci/controller/pci-xgene-msi.c +++ b/drivers/pci/controller/pci-xgene-msi.c @@ -478,8 +478,6 @@ static int xgene_msi_probe(struct platform_device *pdev) for (irq_index = 0; irq_index < NR_HW_IRQS; irq_index++) { virt_msir = platform_get_irq(pdev, irq_index); if (virt_msir < 0) { - dev_err(&pdev->dev, "Cannot translate IRQ index %d\n", - irq_index); rc = virt_msir; goto error; } From patchwork Sun Aug 2 14:26:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 11696517 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 47E68912 for ; Sun, 2 Aug 2020 14:29:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1FF4520759 for ; Sun, 2 Aug 2020 14:29:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HuEZvn5F" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1FF4520759 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0cICTnO3a4aMnlZPXV+qo1Oa44p9JiAIKyr07+m4cms=; b=HuEZvn5FhV2Hp3DRB4HDQ2+vy jkNNIjDm+cdd/7wW54AbXwJiAueEzyRtlSZ4k7W0KAT3SHFBhc1RtB18lod4Lt7fQ4OgvlOZEMhML YBB7ZItZbRUNoB5hen4WJnHg23yN6u8eZjwNpQsrZXvVFkaKd9B5NfGpctiIjhz4MBa2T1j/MMOqq GAZpJoUXHCdDBv3g7ZJCiNYt9jy23oZAIziWLqWj8pVPCHUTPRAE5g+XEq7jQyWjz4+UWx/cP4YDP 6Jg46G4Q+/U8F+d06B9s3HIPDhVMGhRTOqqfSLvRvFNY0sVO+QtNgXpWRNbe1j5YGiFhxxLeE4WfM 4JiPh8BZQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Exd-0007qm-4e; Sun, 02 Aug 2020 14:27:37 +0000 Received: from mail-lf1-f66.google.com ([209.85.167.66]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwN-00074T-6y; Sun, 02 Aug 2020 14:26:20 +0000 Received: by mail-lf1-f66.google.com with SMTP id k13so19179833lfo.0; Sun, 02 Aug 2020 07:26:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/S75/rZPVtT/la0J520uvq4mcrCeNFGU2um+3tul+rI=; b=fTA/2RKakxRz0DygQCYsBOgwnZ9u/grv89kSsDh6QZnxmzPYLUGxY5e0hvyLVyf4qB Rxp1mhGjdabSxkNjNn0qdV3/Xcmsb/ZuhX7TvD/Eo7z33mbsZur+zQe8+qbhbbvzq2fx OQgIOJuAcC/krcioqAUVqTXVhMeqJVu6WyFKf3/ara9GuXrFc/hzFnar+xMacm4HkS9l 44/Kow3epT4Jlg9H0xRs27pStJmwBT3uVKNZGfyRGdeTjbX9UOYv0T3TPEGxyZT9TMbA LUx7wc+XuEDr6RAvPLxdo5aQ39SU9L8tQVHA7Z3L8yt+All9y0hpcdJS38S166FHoLW1 qtmA== X-Gm-Message-State: AOAM532F1JE3tEYO0xOb9f2nuE3uhyowHB8/t4BD5qlgzbtYPadd06a2 Z71AqUrszneAsy/sjiAQZfM= X-Google-Smtp-Source: ABdhPJzNpdAF9CCzGfP8sG9ncd25/FPuC6g6AByGverT5oAgx7TlVWh8xE/g3DI5YXBMEkYyIP2c8Q== X-Received: by 2002:a19:189:: with SMTP id 131mr6399805lfb.128.1596378377807; Sun, 02 Aug 2020 07:26:17 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id 193sm4214136lfa.90.2020.08.02.07.26.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 07:26:17 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Subject: [PATCH 09/10] PCI: rockchip: Remove dev_err() when handing an error from platform_get_irq() Date: Sun, 2 Aug 2020 14:26:01 +0000 Message-Id: <20200802142601.1635926-10-kw@linux.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200802142601.1635926-1-kw@linux.com> References: <20200802142601.1635926-1-kw@linux.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_102619_344882_F993CF83 X-CRM114-Status: GOOD ( 14.23 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.66 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.66 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [kswilczynski[at]gmail.com] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , Binghui Wang , linux-arm-kernel@axis.com, Ley Foon Tan , Thomas Petazzoni , Toan Le , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Xiaowei Song , Hou Zhiqiang , Linus Walleij , Richard Zhu , Sascha Hauer , Yue Wang , Murali Karicheri , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jingoo Han , rfi@lists.rocketboards.org, Shawn Guo , Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. This change is as per suggestion from Coccinelle: drivers/pci/controller/pcie-rockchip-host.c:553:2-9: line 553 is redundant because platform_get_irq() already prints an error drivers/pci/controller/pcie-rockchip-host.c:566:2-9: line 566 is redundant because platform_get_irq() already prints an error drivers/pci/controller/pcie-rockchip-host.c:576:2-9: line 576 is redundant because platform_get_irq() already prints an error Suggested-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński --- drivers/pci/controller/pcie-rockchip-host.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/pci/controller/pcie-rockchip-host.c b/drivers/pci/controller/pcie-rockchip-host.c index 94af6f5828a3..eebe05ab354f 100644 --- a/drivers/pci/controller/pcie-rockchip-host.c +++ b/drivers/pci/controller/pcie-rockchip-host.c @@ -549,10 +549,8 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip) struct platform_device *pdev = to_platform_device(dev); irq = platform_get_irq_byname(pdev, "sys"); - if (irq < 0) { - dev_err(dev, "missing sys IRQ resource\n"); + if (irq < 0) return irq; - } err = devm_request_irq(dev, irq, rockchip_pcie_subsys_irq_handler, IRQF_SHARED, "pcie-sys", rockchip); @@ -562,20 +560,16 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip) } irq = platform_get_irq_byname(pdev, "legacy"); - if (irq < 0) { - dev_err(dev, "missing legacy IRQ resource\n"); + if (irq < 0) return irq; - } irq_set_chained_handler_and_data(irq, rockchip_pcie_legacy_int_handler, rockchip); irq = platform_get_irq_byname(pdev, "client"); - if (irq < 0) { - dev_err(dev, "missing client IRQ resource\n"); + if (irq < 0) return irq; - } err = devm_request_irq(dev, irq, rockchip_pcie_client_irq_handler, IRQF_SHARED, "pcie-client", rockchip); From patchwork Mon Aug 3 07:10:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 11697469 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3C3D913 for ; Mon, 3 Aug 2020 07:12:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AD7FA206D7 for ; Mon, 3 Aug 2020 07:12:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="a7zrFmhj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD7FA206D7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NPeL3bxWTzfXTRMnGl9GqGLyAxwE+0Wn6nfZ0+OQWVM=; b=a7zrFmhjOp/AkJAcpspfjehkk Q4wFARScAnDWyuZGqeoMtxuDYNKTV5f3WhllAmTDlkUnzTGjjN7O4nlFwJHK/bkBiV+tbLIuavQ5C qxHf+cukHLfTUPqo8lzA43WReMs/5Dc8wCZWqb+0884WVP2hz3JTSFR6PB+9qMSM+1NO5AxqvR0wI BDJmEXi9NGEdsxp2k1yCUFvWrLs5eOj45GSVArn46GLn/9YK9t7Ex7LRBfDWBq1YJWKMBU0QOxztO 9lLQRLiQHlM8HWAQgsFeIYoT+0TtBJLPz+YWpVAXkIUDNP99bubdU+ZieSQ7MwGQMev+zX9MSU10/ Akj/0jKDg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2UcQ-00070A-RZ; Mon, 03 Aug 2020 07:10:46 +0000 Received: from mail-lf1-f65.google.com ([209.85.167.65]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2UcO-0006zQ-8W; Mon, 03 Aug 2020 07:10:45 +0000 Received: by mail-lf1-f65.google.com with SMTP id c15so2609424lfi.3; Mon, 03 Aug 2020 00:10:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ay3Bi+IiWilbDlJUPitXEI+RuPwMq9ZiJzLYPsaopL8=; b=MsGSyCz4oCLHkEuVOrHbYgNFRsC8uvhOs9h87NNShyJr3L5M7eI9iJEpeh5fwK6ReY JEdgfa4AyOfYBqBqhNnjf8VPPUNJEVIf0sWeXVJbeqtDCuhRwHmloFA4sFX93nj1CCpj aGgiSGc6731emAk+GW990tOBZhAxxTuHhO/ZlbvzbcuazhppFTRtUcmDmlsx/+FFWt0J v+4BJraUfX3Cd7yFFMnP5JCWKiK0lizKLSujZ3OoRmurzuh5FMqqlpMNDC9qpwlHmYRO H1I+yAo2FYdZmscEUXj368qMH4VEviLLjnAW2qBgJgFF96J45Q7JqMeIPHULfUWLtU6A KL9g== X-Gm-Message-State: AOAM533i9LJn1+EGlvNg6j7RrGlolyZrpZb29pODy0NLcnWHN9tzhtta zbDi4MD8fGLlHuOOyN+3gZY= X-Google-Smtp-Source: ABdhPJzYw7yZDvJbTJfDGxm7OY2EE10qIOitHhsEhQ9czxB+hKmQdhCqIuug22Bs0Z17tX3e9sBetw== X-Received: by 2002:a19:a07:: with SMTP id 7mr7780618lfk.65.1596438642541; Mon, 03 Aug 2020 00:10:42 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id r11sm3877560lji.104.2020.08.03.00.10.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 00:10:41 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Subject: [PATCH 10/10] PCI: xilinx-nwl: Remove dev_err() when handing an error from platform_get_irq() Date: Mon, 3 Aug 2020 07:10:40 +0000 Message-Id: <20200803071040.1663662-1-kw@linux.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200802142601.1635926-1-kw@linux.com> References: <20200802142601.1635926-1-kw@linux.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200803_031044_329238_FD3D65C2 X-CRM114-Status: GOOD ( 15.22 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.65 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.65 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [kswilczynski[at]gmail.com] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , Binghui Wang , linux-arm-kernel@axis.com, Ley Foon Tan , Thomas Petazzoni , Toan Le , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Xiaowei Song , Hou Zhiqiang , Linus Walleij , Richard Zhu , Sascha Hauer , Yue Wang , Murali Karicheri , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jingoo Han , rfi@lists.rocketboards.org, Shawn Guo , Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. This change is as per suggestion from Coccinelle: drivers/pci/controller/pcie-xilinx-nwl.c:732:2-9: line 732 is redundant because platform_get_irq() already prints an error drivers/pci/controller/pcie-xilinx-nwl.c:589:2-9: line 589 is redundant because platform_get_irq() already prints an error drivers/pci/controller/pcie-xilinx-nwl.c:600:2-9: line 600 is redundant because platform_get_irq() already prints an error drivers/pci/controller/pcie-xilinx-nwl.c:801:2-9: line 801 is redundant because platform_get_irq() already prints an error Suggested-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński --- drivers/pci/controller/pcie-xilinx-nwl.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/controller/pcie-xilinx-nwl.c index 9bd1427f2fd6..55489b728484 100644 --- a/drivers/pci/controller/pcie-xilinx-nwl.c +++ b/drivers/pci/controller/pcie-xilinx-nwl.c @@ -586,7 +586,6 @@ static int nwl_pcie_enable_msi(struct nwl_pcie *pcie) /* Get msi_1 IRQ number */ msi->irq_msi1 = platform_get_irq_byname(pdev, "msi1"); if (msi->irq_msi1 < 0) { - dev_err(dev, "failed to get IRQ#%d\n", msi->irq_msi1); ret = -EINVAL; goto err; } @@ -597,7 +596,6 @@ static int nwl_pcie_enable_msi(struct nwl_pcie *pcie) /* Get msi_0 IRQ number */ msi->irq_msi0 = platform_get_irq_byname(pdev, "msi0"); if (msi->irq_msi0 < 0) { - dev_err(dev, "failed to get IRQ#%d\n", msi->irq_msi0); ret = -EINVAL; goto err; } @@ -728,11 +726,8 @@ static int nwl_pcie_bridge_init(struct nwl_pcie *pcie) /* Get misc IRQ number */ pcie->irq_misc = platform_get_irq_byname(pdev, "misc"); - if (pcie->irq_misc < 0) { - dev_err(dev, "failed to get misc IRQ %d\n", - pcie->irq_misc); + if (pcie->irq_misc < 0) return -EINVAL; - } err = devm_request_irq(dev, pcie->irq_misc, nwl_pcie_misc_handler, IRQF_SHARED, @@ -797,10 +792,8 @@ static int nwl_pcie_parse_dt(struct nwl_pcie *pcie, /* Get intx IRQ number */ pcie->irq_intx = platform_get_irq_byname(pdev, "intx"); - if (pcie->irq_intx < 0) { - dev_err(dev, "failed to get intx IRQ %d\n", pcie->irq_intx); + if (pcie->irq_intx < 0) return pcie->irq_intx; - } irq_set_chained_handler_and_data(pcie->irq_intx, nwl_pcie_leg_handler, pcie);