From: "Pali Rohár" <pali@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH] arm64: a37xx: pci: Fix printing debug messages
Date: Mon, 18 Jan 2021 12:09:33 +0100 [thread overview]
Message-ID: <20210118110933.14469-1-pali@kernel.org> (raw)
Value pcie->dev in function pcie_advk_probe() is not initialized yet
so use dev as argument for dev_dbg()/dev_warn().
Function pcie_advk_wait_pio() itself prints error message on failure
so do not print duplicate error message in caller.
Signed-off-by: Pali Roh?r <pali@kernel.org>
---
drivers/pci/pci-aardvark.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index 1534efb88e..8713b88461 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -448,7 +448,6 @@ static int pcie_advk_write_config(struct udevice *bus, pci_dev_t bdf,
advk_writel(pcie, 1, PIO_START);
if (!pcie_advk_wait_pio(pcie)) {
- dev_dbg(pcie->dev, "- wait pio timeout\n");
return -EINVAL;
}
@@ -630,12 +629,12 @@ static int pcie_advk_probe(struct udevice *dev)
* clock should be gated as well.
*/
if (dm_gpio_is_valid(&pcie->reset_gpio)) {
- dev_dbg(pcie->dev, "Toggle PCIE Reset GPIO ...\n");
+ dev_dbg(dev, "Toggle PCIE Reset GPIO ...\n");
dm_gpio_set_value(&pcie->reset_gpio, 1);
mdelay(200);
dm_gpio_set_value(&pcie->reset_gpio, 0);
} else {
- dev_warn(pcie->dev, "PCIE Reset on GPIO support is missing\n");
+ dev_warn(dev, "PCIE Reset on GPIO support is missing\n");
}
pcie->first_busno = dev_seq(dev);
--
2.20.1
next reply other threads:[~2021-01-18 11:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 11:09 Pali Rohár [this message]
2021-01-18 13:28 ` [PATCH] arm64: a37xx: pci: Fix printing debug messages Stefan Roese
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=20210118110933.14469-1-pali@kernel.org \
--to=pali@kernel.org \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox