Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2542284rdh; Sun, 29 Oct 2023 23:13:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRPUI1rI3xC9JXSLUmL2mL8UuWE0vvyUs4jgf8uJs7ys8YOJR2hwkO8Z/sUqQyZ3/R3wbo X-Received: by 2002:a05:6a21:7906:b0:174:af85:91fc with SMTP id bg6-20020a056a21790600b00174af8591fcmr6488848pzc.48.1698646395013; Sun, 29 Oct 2023 23:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698646394; cv=none; d=google.com; s=arc-20160816; b=G0497zgIGo5Vg2xI66Wg2LYlfPxD5HbXFiKhuJbT1dLen2IRzeq2A2EAoqMUyThjz0 P8LxgZMNFzXemcDWlcsokTQP6BjVIDXN5ugxCTdBwtXyfxSR4MjBR02Mf/guozBBHV8+ LZa597utUPXItaI5VIlMY0mUX4386c+V6AXLH/hCAH5WkVV3TgEWN7X8zXwqdVU8P5V0 1XakQq7DSAMuSyDgZ4koRr+5gLQXU5WyU62BbFG4CNuLEUxy60P6Vmd1q6/kSPo+WPnO ZngbyfLGn/eSHqyLlPz0tPESJTfDyUn4s5YwW0BeGclldZCrP23KuhWcT5Fx2nog86Q2 YAng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=JvNeIc7v/0VZwf5A23O6/UK3PgEGpOgW8mj9rEcO2AA=; fh=5l9cLAmm1xxs6u4nQ7Sd7ys5XuejJJi+N8qQjBsTFaw=; b=L5lQpi5bxVb2AvmgNS46X1Rs44QqziyP0E16tFgvL2Cpx3oeFOzfVKrG9rTx+iEfU8 oxD5ZUpd5/vErAogjhk3M58wt3wE14O9Qfv7f6THXrY4rnjmTXQYTqiq1t5JBAQzvenZ Gm6OYgDneTa0E6S6GZDhb6uvYzMUZJdpRQOKNTRyh0LwJlaIhGcLOD+PhwVjGsQsWUG9 5CuRQTvnTmegtcN7MCSh74i+kjoBmROY84+Ro4sBCXIJZ+ih40VIBhIK+whMQX5wN+Iq Zdg3PX0G/BgHbuonDJRnmMgsxBk0y4OTzUBvEeCiH8JXk2C2O8h6kj8+HXcFwuNLcXTu URuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id nl10-20020a17090b384a00b0027d4901b0b1si768961pjb.82.2023.10.29.23.13.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 23:13:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 621E9805A903; Sun, 29 Oct 2023 23:13:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231285AbjJ3GMz (ORCPT + 99 others); Mon, 30 Oct 2023 02:12:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjJ3GMy (ORCPT ); Mon, 30 Oct 2023 02:12:54 -0400 Received: from out30-101.freemail.mail.aliyun.com (out30-101.freemail.mail.aliyun.com [115.124.30.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFF2FA9; Sun, 29 Oct 2023 23:12:47 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0Vv6phb3_1698646362; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Vv6phb3_1698646362) by smtp.aliyun-inc.com; Mon, 30 Oct 2023 14:12:43 +0800 From: Yang Li To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, michal.simek@amd.com Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] PCI: xilinx-xdma: Remove redundant dev_err() Date: Mon, 30 Oct 2023 14:12:42 +0800 Message-Id: <20231030061242.51475-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 29 Oct 2023 23:13:12 -0700 (PDT) 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. ./drivers/pci/controller/pcie-xilinx-dma-pl.c:688:2-9: line 688 is redundant because platform_get_irq() already prints an error ./drivers/pci/controller/pcie-xilinx-dma-pl.c:702:2-9: line 702 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7074 Signed-off-by: Yang Li --- drivers/pci/controller/pcie-xilinx-dma-pl.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/pcie-xilinx-dma-pl.c b/drivers/pci/controller/pcie-xilinx-dma-pl.c index 2f7d676c683c..4e49b12a2e2a 100644 --- a/drivers/pci/controller/pcie-xilinx-dma-pl.c +++ b/drivers/pci/controller/pcie-xilinx-dma-pl.c @@ -684,10 +684,8 @@ static int xilinx_request_msi_irq(struct pl_dma_pcie *port) int ret; port->msi.irq_msi0 = platform_get_irq_byname(pdev, "msi0"); - if (port->msi.irq_msi0 <= 0) { - dev_err(dev, "Unable to find msi0 IRQ line\n"); + if (port->msi.irq_msi0 <= 0) return port->msi.irq_msi0; - } ret = devm_request_irq(dev, port->msi.irq_msi0, xilinx_pl_dma_pcie_msi_handler_low, IRQF_SHARED | IRQF_NO_THREAD, "xlnx-pcie-dma-pl", @@ -698,10 +696,8 @@ static int xilinx_request_msi_irq(struct pl_dma_pcie *port) } port->msi.irq_msi1 = platform_get_irq_byname(pdev, "msi1"); - if (port->msi.irq_msi1 <= 0) { - dev_err(dev, "Unable to find msi1 IRQ line\n"); + if (port->msi.irq_msi1 <= 0) return port->msi.irq_msi1; - } ret = devm_request_irq(dev, port->msi.irq_msi1, xilinx_pl_dma_pcie_msi_handler_high, IRQF_SHARED | IRQF_NO_THREAD, "xlnx-pcie-dma-pl", -- 2.20.1.7.g153144c