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: 11696469 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 2EE9E912 for ; Sun, 2 Aug 2020 14:26:34 +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 050AC20759 for ; Sun, 2 Aug 2020 14:26:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="e1EZUODT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 050AC20759 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=TUSlt97z6ZCe/4sCZw/1LvLROQu/NYuXf89pZduPAkY=; b=e1EZUODTMGuwGSGYjJItgpIsU qRosxmgKajFBJpldN9NOEGjNycqeh4/6lmVQU6p8idNWmqQBqDKPs8V9RsEAO5+HF0r4B+gHm2FbT a8jwX63db7UrwLcI3/qLl5uIKK1eJ3pl5Prptnq6gp0qM0vjLLkmYMrnN/3fHIcOwAPDEkCo549MC +M41mbveXKJ2aUnwyDos9fW3g9jKfL6mvYs7nJeFB3UrzpvgtDSsjGgCaFTy/Du2asd4sDs2e18m6 MqnP3Pd9h/w1EHAtiqJ7hdBIGgCJZeUQV3ciuikcB36YwLUt5ZhHr9a7R9bYVtPeTi5xJ/wlW/Hvy b78bQxpDA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Ewb-0007C8-1z; Sun, 02 Aug 2020 14:26:33 +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-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=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;