From patchwork Thu Oct 7 12:28:48 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: 12541723 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 DB4A6C433F5 for ; Thu, 7 Oct 2021 12:31:29 +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 A55F961038 for ; Thu, 7 Oct 2021 12:31:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A55F961038 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=WG0TFsFs9KORGoD7247doQBOc7JxlxXxAES9JrfUfZg=; b=cj31zva492+jca TBHn8HUqXgwvkAERdB5wxmaAnz1fGl2DsS+oEaG/JUi3zvX/8X35VQwPcVzDiGEvPUcGezk36NVz+ JizE/LL7mag9K8LqICuwAUwErn69tG3kfMTVCd3/N2PWkTQWvVqlj8hkK1vefexTndNaKDl53HGyt FHdfD4E/ALIA5bUY5q4sGYR4GzY6MF19g1W4/znKB9C1AhJAt5674X1be4aUZRVRrixzKI7vZEYNN /LKxsJ8ZwMRgjyvlIl5O41wpZbZAHedyxv9++nmUkB846NMEne99MihaJiQXx+jWeQvsAftiKs/rN 83hJRGttvOxga3TZiMKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYSWD-00HGNY-CC; Thu, 07 Oct 2021 12:29:02 +0000 Received: from mail-wr1-f47.google.com ([209.85.221.47]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYSW5-00HGL6-02 for linux-arm-kernel@lists.infradead.org; Thu, 07 Oct 2021 12:28:54 +0000 Received: by mail-wr1-f47.google.com with SMTP id e12so18571046wra.4 for ; Thu, 07 Oct 2021 05:28:51 -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=MuFi30eEEwL/5PO+lT1Ikojs9mD1FQlwaGnA1x8pqyE=; b=H2NHh3vKVzv8CR1iIuaKCc1exKNk9HDpTrUsEdPQ4lKB+H55uoPHZzuZodkq+p7tU9 vkPj+RAknhrjVv+eSEqwGwuq8kgeltqDtxTMjLUSIhMp+h6JPZIu5mVhSUDjlwAN6YnX E/x3y1i//k2TDaAyV/u9gjZKx7qAV4w9uOnOQ2Qr0KuSL64wxE+ZwZkgYHoGqe3YX9AO Q3f54VJml9exzuJZOdzDKGCfmfaX04dod1IFGZ8Vj5WN62GonF1uoENMIrIQzRAuGK+N Ao3qiScSyLyo6/MvpcRvAh1o7664+BDh3L4A3sJn6aV5zxP2S61WG+JcctxeyqBG5MxM TT9g== X-Gm-Message-State: AOAM531LZrOhAeVQy2nZ8fjYRWfsyl7JQKDCprUc/iS7D2EaVESe4JIj /Sa9CmIC4TufYRXYhs/EL5c= X-Google-Smtp-Source: ABdhPJxPfrWY0+LxRNWWTLMgnYSFWFr2xDFEiCo6DtMmzp2x5gYh8ktF9cxzMTYTHc1yKt2IyCLZBw== X-Received: by 2002:a7b:cb08:: with SMTP id u8mr4515765wmj.104.1633609730284; Thu, 07 Oct 2021 05:28:50 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id l11sm11749916wms.45.2021.10.07.05.28.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 05:28:49 -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 v2] PCI: visconti: Remove surplus dev_err() when using platform_get_irq_byname() Date: Thu, 7 Oct 2021 12:28:48 +0000 Message-Id: <20211007122848.3366-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-20211007_052853_095228_1C06CD20 X-CRM114-Status: GOOD ( 13.86 ) 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 --- Changes in v2: Remove unused "dev" variable following removal of the dev_err() as reported by Intel's CI bot. drivers/pci/controller/dwc/pcie-visconti.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-visconti.c b/drivers/pci/controller/dwc/pcie-visconti.c index a88eab6829bb..50f80f07e4db 100644 --- a/drivers/pci/controller/dwc/pcie-visconti.c +++ b/drivers/pci/controller/dwc/pcie-visconti.c @@ -279,13 +279,10 @@ static int visconti_add_pcie_port(struct visconti_pcie *pcie, { struct dw_pcie *pci = &pcie->pci; struct pcie_port *pp = &pci->pp; - 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;