From patchwork Fri Oct 1 01:16:26 2021 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: 12529623 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2654AC433F5 for ; Fri, 1 Oct 2021 01:18:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DE32461452 for ; Fri, 1 Oct 2021 01:18:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DE32461452 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=s2wKqC1CUNgV6RMdEM1CD7q7tzkzpeh6IvR9Ajs2kh0=; b=aLPObo3B/u71Va TB8OWVCeLh5T9OR0xa5mIIVEQ8h3D4FxHw8Ewu6EGSLQUGXqGCyaFI7omy8teK6ROzT95kY4TzVyc fZ0pe5rtaO5EfDcpx5soVtU8Zl1ZAhJSJBFvjurXpRiOzrgxo3HRDopoNhZ/gQDHADUQ+dSLP2laP HBFK6szBMtJ3DJhZCiRj179VFTEC1c48c6/tEQ6X2JS6Sg4nHqqY2BnUBm5A+GouPOLQmClxlpVSD MVk0USSWmWvDD548BRNVZwyj/0qKOKhr1AV2OHJQ3GIKLlwnJ3hZeFUWHn/2t0fTVrWF6UPpBLQHD 9EGDnr2Ey/BF1/NQnWAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mW7AA-00GOMx-0e; Fri, 01 Oct 2021 01:16:34 +0000 Received: from mail-wr1-f48.google.com ([209.85.221.48]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mW7A6-00GOMV-AD for linux-arm-kernel@lists.infradead.org; Fri, 01 Oct 2021 01:16:31 +0000 Received: by mail-wr1-f48.google.com with SMTP id d21so12825574wra.12 for ; Thu, 30 Sep 2021 18:16:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RQiSJdCX0tlMnA3Q7WCH9Xmfl+JtRrBqDMyYICSkAbo=; b=uYWJF38ESdmRWwo4axdbuijCDAwU2PhSxC7Nm345g4vdqa1rQheiNxTKX0sFfCzvkP A1XpI692L4YGZ4nyhmZu2pCmMEHV7jKqIUNuhsD67qk9Yoq7qhsdHFMuxeXH0yHlp/tL nCqY6ekwaDctYKIdeHSbRSGSX3xasSyvTbBe4gga59JDV/HDbzcNbmeD0Nwgs0HvtzUb +BZ/dosZSCriwFigjNYvYUTYcRXjpreyYfYd//JGtIj53FN1zT2x/kUhPbRmhwtvVBpY HQLCkUNOOhtBLnggjt8hz0ByomE4drNaU/zX8cDoeFspnnp66nFZta0BfuKujOpT4pxX eqhg== X-Gm-Message-State: AOAM532JdphOIid7mo/qR0BeeKZThzo+A/kSC29iXCJomWwpy+se/SVS ETgBn8LqEIMWXu2yjVcfmto= X-Google-Smtp-Source: ABdhPJwJHiwe6vHkBlQrFnGM5Qik5kVAk8M2QlgWYmNtSKfhtb08Ck/KIvvcO3jLGbCBHBhoz+Zq+w== X-Received: by 2002:a5d:684f:: with SMTP id o15mr9632187wrw.268.1633050988181; Thu, 30 Sep 2021 18:16:28 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id q9sm3629217wrx.4.2021.09.30.18.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 18:16:27 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Cc: Lorenzo Pieralisi , Nobuhiro Iwamatsu , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] PCI: visconti: Remove surplus dev_err() when using platform_get_irq_byname() Date: Fri, 1 Oct 2021 01:16:26 +0000 Message-Id: <20211001011626.132286-1-kw@linux.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210930_181630_399217_69397583 X-CRM114-Status: GOOD ( 12.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.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 suggestions from Coccinelle, e.g., drivers/pci/controller/dwc/pcie-visconti.c:286:2-9: line 286 is redundant because platform_get_irq() already prints an error Related: https://lore.kernel.org/all/20210310131913.2802385-1-kw@linux.com/ https://lore.kernel.org/all/20200802142601.1635926-1-kw@linux.com/ Signed-off-by: Krzysztof WilczyƄski Acked-by: Nobuhiro Iwamatsu --- drivers/pci/controller/dwc/pcie-visconti.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-visconti.c b/drivers/pci/controller/dwc/pcie-visconti.c index a88eab6829bb..076da46726a7 100644 --- a/drivers/pci/controller/dwc/pcie-visconti.c +++ b/drivers/pci/controller/dwc/pcie-visconti.c @@ -282,10 +282,8 @@ static int visconti_add_pcie_port(struct visconti_pcie *pcie, struct device *dev = &pdev->dev; pp->irq = platform_get_irq_byname(pdev, "intr"); - if (pp->irq < 0) { - dev_err(dev, "Interrupt intr is missing"); + if (pp->irq < 0) return pp->irq; - } pp->ops = &visconti_pcie_host_ops;