From: "Krzysztof Wilczyński" <kw@linux.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Daire McNamara <daire.mcnamara@microchip.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Rob Herring <robh@kernel.org>,
linux-pci@vger.kernel.org
Subject: [PATCH] PCI: microchip: Remove dev_err() when handing an error from platform_get_irq()
Date: Wed, 10 Mar 2021 13:19:13 +0000 [thread overview]
Message-ID: <20210310131913.2802385-1-kw@linux.com> (raw)
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/pcie-microchip-host.c:1027:2-9: line 1027 is
redundant because platform_get_irq() already prints an error
Related commit caecb05c8000 ("PCI: Remove dev_err() when handing an
error from platform_get_irq()").
Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
---
drivers/pci/controller/pcie-microchip-host.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pci/controller/pcie-microchip-host.c b/drivers/pci/controller/pcie-microchip-host.c
index 04c19ff81aff..80cef572c904 100644
--- a/drivers/pci/controller/pcie-microchip-host.c
+++ b/drivers/pci/controller/pcie-microchip-host.c
@@ -1023,10 +1023,8 @@ static int mc_platform_init(struct pci_config_window *cfg)
}
irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(dev, "unable to request IRQ%d\n", irq);
+ if (irq < 0)
return -ENODEV;
- }
for (i = 0; i < NUM_EVENTS; i++) {
event_irq = irq_create_mapping(port->event_domain, i);
--
2.30.1
next reply other threads:[~2021-03-10 13:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 13:19 Krzysztof Wilczyński [this message]
2021-03-22 14:26 ` [PATCH] PCI: microchip: Remove dev_err() when handing an error from platform_get_irq() Lorenzo Pieralisi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210310131913.2802385-1-kw@linux.com \
--to=kw@linux.com \
--cc=daire.mcnamara@microchip.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.