* [PATCH] ARM: PCI: use __func__ in debug messages
@ 2021-07-27 13:34 ` Jason Wang
0 siblings, 0 replies; 2+ messages in thread
From: Jason Wang @ 2021-07-27 13:34 UTC (permalink / raw)
To: linusw; +Cc: kaloz, khalasa, linux, linux-arm-kernel, linux-kernel, Jason Wang
Perhaps, the '"%s...", __func__' is more convenient to show current
function in a debug message.
Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
---
arch/arm/mach-ixp4xx/common-pci.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index 893c19c254e3..deb80fe05c03 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -203,18 +203,18 @@ static u32 local_byte_lane_enable_bits(u32 n, int size)
static int local_read_config(int where, int size, u32 *value)
{
u32 n, data;
- pr_debug("local_read_config from %d size %d\n", where, size);
+ pr_debug("%s from %d size %d\n", __func__, where, size);
n = where % 4;
crp_read(where & ~3, &data);
*value = (data >> (8*n)) & bytemask[size];
- pr_debug("local_read_config read %#x\n", *value);
+ pr_debug("%s read %#x\n", __func__, *value);
return PCIBIOS_SUCCESSFUL;
}
static int local_write_config(int where, int size, u32 value)
{
u32 n, byte_enables, data;
- pr_debug("local_write_config %#x to %d size %d\n", value, where, size);
+ pr_debug("%s %#x to %d size %d\n", __func__, value, where, size);
n = where % 4;
byte_enables = local_byte_lane_enable_bits(n, size);
if (byte_enables == 0xffffffff)
@@ -293,8 +293,8 @@ static int abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *r
isr = *PCI_ISR;
local_read_config(PCI_STATUS, 2, &status);
- pr_debug("PCI: abort_handler addr = %#lx, isr = %#x, "
- "status = %#x\n", addr, isr, status);
+ pr_debug("PCI: %s addr = %#lx, isr = %#x, status = %#x\n",
+ __func__, addr, isr, status);
/* make sure the Master Abort bit is reset */
*PCI_ISR = PCI_ISR_PFE;
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ARM: PCI: use __func__ in debug messages
@ 2021-07-27 13:34 ` Jason Wang
0 siblings, 0 replies; 2+ messages in thread
From: Jason Wang @ 2021-07-27 13:34 UTC (permalink / raw)
To: linusw; +Cc: kaloz, khalasa, linux, linux-arm-kernel, linux-kernel, Jason Wang
Perhaps, the '"%s...", __func__' is more convenient to show current
function in a debug message.
Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
---
arch/arm/mach-ixp4xx/common-pci.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index 893c19c254e3..deb80fe05c03 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -203,18 +203,18 @@ static u32 local_byte_lane_enable_bits(u32 n, int size)
static int local_read_config(int where, int size, u32 *value)
{
u32 n, data;
- pr_debug("local_read_config from %d size %d\n", where, size);
+ pr_debug("%s from %d size %d\n", __func__, where, size);
n = where % 4;
crp_read(where & ~3, &data);
*value = (data >> (8*n)) & bytemask[size];
- pr_debug("local_read_config read %#x\n", *value);
+ pr_debug("%s read %#x\n", __func__, *value);
return PCIBIOS_SUCCESSFUL;
}
static int local_write_config(int where, int size, u32 value)
{
u32 n, byte_enables, data;
- pr_debug("local_write_config %#x to %d size %d\n", value, where, size);
+ pr_debug("%s %#x to %d size %d\n", __func__, value, where, size);
n = where % 4;
byte_enables = local_byte_lane_enable_bits(n, size);
if (byte_enables == 0xffffffff)
@@ -293,8 +293,8 @@ static int abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *r
isr = *PCI_ISR;
local_read_config(PCI_STATUS, 2, &status);
- pr_debug("PCI: abort_handler addr = %#lx, isr = %#x, "
- "status = %#x\n", addr, isr, status);
+ pr_debug("PCI: %s addr = %#lx, isr = %#x, status = %#x\n",
+ __func__, addr, isr, status);
/* make sure the Master Abort bit is reset */
*PCI_ISR = PCI_ISR_PFE;
--
2.32.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-27 13:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 13:34 [PATCH] ARM: PCI: use __func__ in debug messages Jason Wang
2021-07-27 13:34 ` Jason Wang
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.