From patchwork Sun Aug 2 14:25:58 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: 11696441 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 7C807912 for ; Sun, 2 Aug 2020 14:26:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D3262177B for ; Sun, 2 Aug 2020 14:26:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726456AbgHBO0R (ORCPT ); Sun, 2 Aug 2020 10:26:17 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:39824 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726300AbgHBO0Q (ORCPT ); Sun, 2 Aug 2020 10:26:16 -0400 Received: by mail-lj1-f193.google.com with SMTP id v9so2518447ljk.6; Sun, 02 Aug 2020 07:26:13 -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=B3KSoQD71byHkg+Qsnb1jzju+E/FIRrV3OAj8SbgT+c=; b=U/pXa3ZFFy1zZ6Hh+bsEfoaz+WOqKI+RYWU+6UbZAUiDnz+kx2JSj414b1X1eatMo4 PHjADBU7ud1snOlbQFSIbr4YXwEVOuMKFTQBEanOZOuIWtpLfz6NxUGMq49ZJJvvWBz5 2NWhUpuYcFdpfuwB1p9+ZoqJlG+8BqMCYq+W+8Lut/cCrsu3G1q94ky4ujanQFm5Lehj qNqMSX2NbGMmCX/gZaG5wiohrhCiZBseNWBjeXayq4h5T1PVqXFIDD7dCim54N/t1hu5 vRVB8EUdgD9NBy2qv5kVOHB1wdaoFyvr21zbbAqtmBmqdpxgi2eWA1OxL8J1YOy6bCux sAmQ== X-Gm-Message-State: AOAM532jezQ/lSoNzMrwys13VR7NyHIJBWl/sDIqbWRBBAHnY2GnKKJ4 7hdFdpnRUeQe6rgfDuA8dnQ= X-Google-Smtp-Source: ABdhPJy+xlZ4x5ScpsArHy4QaEW+arFDZ4OILOPVHDYUlBaUmY+RMdxu/xscCf5AhzmdVlScycAYuQ== X-Received: by 2002:a2e:9bc1:: with SMTP id w1mr6140877ljj.288.1596378373175; Sun, 02 Aug 2020 07:26:13 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id 193sm4214136lfa.90.2020.08.02.07.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 07:26:12 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Cc: Jingoo Han , Kukjin Kim , Krzysztof Kozlowski , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Murali Karicheri , Yue Wang , Kevin Hilman , Thomas Petazzoni , Jesper Nilsson , Xiaowei Song , Binghui Wang , Pratyush Anand , Hou Zhiqiang , Linus Walleij , Toan Le , Ley Foon Tan , Shawn Lin , Heiko Stuebner , linux-amlogic@lists.infradead.org, linux-arm-kernel@axis.com, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, rfi@lists.rocketboards.org Subject: [PATCH 06/10] PCI: v3-semi: Remove dev_err() when handing an error from platform_get_irq() Date: Sun, 2 Aug 2020 14:25:58 +0000 Message-Id: <20200802142601.1635926-7-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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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/pci-v3-semi.c:781:2-9: line 781 is redundant because platform_get_irq() already prints an error Suggested-by: Bjorn Helgaas Signed-off-by: Krzysztof WilczyƄski --- drivers/pci/controller/pci-v3-semi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/pci-v3-semi.c b/drivers/pci/controller/pci-v3-semi.c index 3681e5af3878..2a19f2a98945 100644 --- a/drivers/pci/controller/pci-v3-semi.c +++ b/drivers/pci/controller/pci-v3-semi.c @@ -777,10 +777,9 @@ static int v3_pci_probe(struct platform_device *pdev) /* Get and request error IRQ resource */ irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(dev, "unable to obtain PCIv3 error IRQ\n"); + if (irq < 0) return irq; - } + ret = devm_request_irq(dev, irq, v3_irq, 0, "PCIv3 error", v3); if (ret < 0) {