Message ID | 20200802142601.1635926-4-kw@linux.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=PDab=BM=lists.infradead.org=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@kernel.org> 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 BC70313B6 for <patchwork-linux-rockchip@patchwork.kernel.org>; Sun, 2 Aug 2020 14:26:29 +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 95ED620759 for <patchwork-linux-rockchip@patchwork.kernel.org>; Sun, 2 Aug 2020 14:26:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aQKGnUWT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95ED620759 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-rockchip-bounces+patchwork-linux-rockchip=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=9uRjWySERl2Ty6pdUECUPhZCE7RwaCUqGNsPJ+xRiXk=; b=aQKGnUWTymVuSPpO+vhbxeCou 3JCNMbXdTS26dqF6Fv2qaviGzZmWsiospSK9v5YcmwJ0/+Ui3C6CkKEod+VeHEPsBMYht19JU/PKc 4pabO4eX6GM8m9ZaDJB2uThCw6vtPbYMdAQl0ciKSIsY1jmgMTLGP2du6RwzEXEX+iNUOSBuPaXf9 E95NSsVz+0OGZbyqtppTRZAmCEi+uXeWyI3QTDBjnjurQ8ufm0UfGvGLqtf79ATertTiOVHTCJg0w pqz8AbbaD8NLmz9Xp9x4k5AQaVBxcqim+zmIWztCjW4O6MmRM25YLULycsxyG3Q1PRU7H7QNUOJnN wpS99nOxw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2EwW-00079s-Sx; Sun, 02 Aug 2020 14:26:28 +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?= <kw@linux.com> To: Bjorn Helgaas <bhelgaas@google.com> 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-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms <linux-rockchip.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-rockchip>, <mailto:linux-rockchip-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-rockchip/> List-Post: <mailto:linux-rockchip@lists.infradead.org> List-Help: <mailto:linux-rockchip-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-rockchip>, <mailto:linux-rockchip-request@lists.infradead.org?subject=subscribe> Cc: Heiko Stuebner <heiko@sntech.de>, linux-pci@vger.kernel.org, Shawn Lin <shawn.lin@rock-chips.com>, Binghui Wang <wangbinghui@hisilicon.com>, linux-arm-kernel@axis.com, Ley Foon Tan <ley.foon.tan@intel.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Toan Le <toan@os.amperecomputing.com>, Jesper Nilsson <jesper.nilsson@axis.com>, linux-samsung-soc@vger.kernel.org, Kevin Hilman <khilman@baylibre.com>, Pratyush Anand <pratyush.anand@gmail.com>, Krzysztof Kozlowski <krzk@kernel.org>, linux-rockchip@lists.infradead.org, Kukjin Kim <kgene@kernel.org>, Xiaowei Song <songxiaowei@hisilicon.com>, Hou Zhiqiang <Zhiqiang.Hou@nxp.com>, Linus Walleij <linus.walleij@linaro.org>, Richard Zhu <hongxing.zhu@nxp.com>, Sascha Hauer <s.hauer@pengutronix.de>, Yue Wang <yue.wang@Amlogic.com>, Murali Karicheri <m-karicheri2@ti.com>, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jingoo Han <jingoohan1@gmail.com>, rfi@lists.rocketboards.org, Shawn Guo <shawnguo@kernel.org>, Lucas Stach <l.stach@pengutronix.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "Linux-rockchip" <linux-rockchip-bounces@lists.infradead.org> Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org |
Series |
Remove surplus dev_err() when handing an error from platform_get_irq()
|
expand
|
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;
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 <bhelgaas@google.com> Signed-off-by: Krzysztof Wilczyński <kw@linux.com> --- drivers/pci/controller/pci-tegra.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)