[PATCH v2 2/7] PCI/parisc: Clean up resource debug print & use dynamic debug

From: Ilpo Järvinen

Date: Fri Oct 02 2026 - 07:34:31 EST


Remove adhoc RES_DBG() and use pci_dbg() instead.

Reformat the message to the typical format used by PCI core. Print the
resources using %pR.

Correct format specifiers and remove non-sensical res->flags int cast.

Dynamic debug prints can be enabled by providing dyndbg command line
parameter or through /sys/kernel/debug/dynamic_debug/control so this
is more versatile way to debug things than the previous compile time
decision which could only be enable by changing the source code.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
---
arch/parisc/kernel/pci.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c
index b8007c7400d4..518f532ccddc 100644
--- a/arch/parisc/kernel/pci.c
+++ b/arch/parisc/kernel/pci.c
@@ -19,7 +19,6 @@
#include <asm/io.h>
#include <asm/superio.h>

-#define DEBUG_RESOURCES 0
#define DEBUG_CONFIG 0

#if DEBUG_CONFIG
@@ -28,13 +27,6 @@
# define DBGC(x...)
#endif

-
-#if DEBUG_RESOURCES
-#define DBG_RES(x...) printk(KERN_DEBUG x)
-#else
-#define DBG_RES(x...)
-#endif
-
struct pci_port_ops *pci_port __ro_after_init;
struct pci_bios_ops *pci_bios __ro_after_init;

@@ -204,10 +196,9 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
struct pci_dev *dev = data;
resource_size_t align, start = res->start;

- DBG_RES("pcibios_align_resource(%s, (%p) [%lx,%lx]/%x, 0x%lx, 0x%lx)\n",
- pci_name(((struct pci_dev *) data)),
- res->parent, res->start, res->end,
- (int) res->flags, size, alignment);
+ pci_dbg(dev, "%pR: pcibios_align_resource(%lx, 0x%llx, 0x%llx), parent %pR\n",
+ res, res->flags, (unsigned long long)size,
+ (unsigned long long)alignment, res->parent);

/* If it's not IO, then it's gotta be MEM */
align = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;
--
2.47.3