Thread (57 messages) read the whole thread 57 messages, 9 authors, 2025-03-08

Re: [PATCH v7 3/5] Add debugfs based silicon debug support in DWC

From: Krzysztof Wilczyński <hidden>
Date: 2025-03-06 09:02:38
Also in: linux-pci, linux-perf-users, linux-renesas-soc, lkml

Hello,

[...]
Another issue is that the caller does not handle failures correctly,
given (A) the irqdomain WARNING I got, and (B) the half-registered
PCI bus, oopsing on "lspci"...
This is something we will look into.  A more robust DesignWare core is
something we would definitely want to have.

Sorry about the issues with this...

[...]
quoted
-int dwc_pcie_debugfs_init(struct dw_pcie *pci)
+void dwc_pcie_debugfs_init(struct dw_pcie *pci)
 {
        char dirname[DWC_DEBUGFS_BUF_MAX];
        struct device *dev = pci->dev;
@@ -174,17 +174,15 @@ int dwc_pcie_debugfs_init(struct dw_pcie *pci)
        snprintf(dirname, DWC_DEBUGFS_BUF_MAX, "dwc_pcie_%s", dev_name(dev));
        dir = debugfs_create_dir(dirname, NULL);
        debugfs = devm_kzalloc(dev, sizeof(*debugfs), GFP_KERNEL);
-       if (!debugfs)
-               return -ENOMEM;
+       if (!debugfs) {
+               dev_err(dev, "failed to allocate memory for debugfs\n");
There is no need to print an error message when a memory allocation
fails, as the memory allocation core already takes care of that.
So please drop the dev_err() call.
Done.  Thank you!

	Krzysztof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help