[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20251126.174256.633005540160473731.rene@exactco.de>
Date: Wed, 26 Nov 2025 17:42:56 +0100 (CET)
From: René Rebe <rene@...ctco.de>
To: linux-kernel@...r.kernel.org
Cc: Dominik Brodowski <linux@...inikbrodowski.net>
Subject: [PATCH] PCMCIA: Fix garbled log messages for KERN_CONT
For years the PCMCIA info messages are messed up by superfluous
newlines. While f2e6cf76751d ("pcmcia: Convert dev_printk to
dev_<level>") converted the code to pr_cont(), dev_info enforces a \n
via vprintk_store setting LOG_NEWLINE, breaking subsequent pr_cont.
Fix by logging the device name manually to allow pr_cont to work for
more readable and not \n distorted logs.
Fixes: f2e6cf76751d ("pcmcia: Convert dev_printk to dev_<level>")
Signed-off-by: René Rebe <rene@...ctco.de>
---
Tested on embedded board w/ a Ricoh PCMCIA PCI bridge running T2/Linux.
prev:
[ 5401.456057] yenta_cardbus 0000:02:06.0: CardBus bridge found [0000:0000]
[ 5401.583275] yenta_cardbus 0000:02:06.0: ISA IRQ mask 0x0000, PCI irq 5
[ 5401.583323] yenta_cardbus 0000:02:06.0: Socket status: 30000006
[ 5401.583376] yenta_cardbus 0000:02:06.0: pcmcia: parent PCI bridge window: [io 0xd000-0xdfff]
[ 5401.583411] pcmcia_socket pcmcia_socket0: cs: IO port probe 0xd000-0xdfff:
[ 5401.587663] excluding 0xd000-0xd0ff 0xd400-0xd4ff 0xd800-0xd8ff
[ 5401.594124] yenta_cardbus 0000:02:06.0: pcmcia: parent PCI bridge window: [mem 0xec100000-0xec1fffff]
[ 5401.594160] pcmcia_socket pcmcia_socket0: cs: memory probe 0xec100000-0xec1fffff:
[ 5401.594362] excluding 0xec100000-0xec10ffff
[ 5401.594860] yenta_cardbus 0000:02:06.0: pcmcia: parent PCI bridge window: [mem 0x40000000-0x47ffffff pref]
[ 5401.594888] pcmcia_socket pcmcia_socket0: cs: memory probe 0x40000000-0x47ffffff:
[ 5401.595030] excluding 0x40000000-0x47ffffff
[ 5401.661589] pcmcia_socket pcmcia_socket0: cs: IO port probe 0x100-0x3af:
[ 5401.661678] excluding nothing: probe failed.
[ 5401.662038] pcmcia_socket pcmcia_socket0: cs: IO port probe 0x3e0-0x4ff:
[ 5401.662070] excluding nothing: probe failed.
[ 5401.663632] pcmcia_socket pcmcia_socket0: cs: IO port probe 0x820-0x8ff:
[ 5401.663676] excluding nothing: probe failed.
[ 5401.664908] pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc00-0xcf7:
[ 5401.664947] excluding nothing: probe failed.
[ 5401.666811] pcmcia_socket pcmcia_socket0: cs: memory probe 0x0c0000-0x0fffff:
[ 5401.667155] excluding 0xc0000-0xfffff
[ 5401.669654] pcmcia_socket pcmcia_socket0: cs: memory probe 0xa0000000-0xa0ffffff:
[ 5401.669713] excluding 0xa0000000-0xa0ffffff
[ 5401.670930] pcmcia_socket pcmcia_socket0: cs: memory probe 0x60000000-0x60ffffff:
[ 5401.670974] excluding 0x60000000-0x60ffffff
[ 5401.671374] pcmcia_socket pcmcia_socket0: cs: IO port probe 0xa00-0xaff:
[ 5401.671409] excluding nothing: probe failed.
new:
[ 5433.919596] yenta_cardbus 0000:02:06.0: CardBus bridge found [0000:0000]
[ 5434.047165] yenta_cardbus 0000:02:06.0: ISA IRQ mask 0x0000, PCI irq 5
[ 5434.047213] yenta_cardbus 0000:02:06.0: Socket status: 30000006
[ 5434.047266] yenta_cardbus 0000:02:06.0: pcmcia: parent PCI bridge window: [io 0xd000-0xdfff]
[ 5434.047297] pcmcia_socket0: cs: IO port probe 0xd000-0xdfff: excluding 0xd000-0xd0ff 0xd400-0xd4ff 0xd800-0xd8ff
[ 5434.058597] yenta_cardbus 0000:02:06.0: pcmcia: parent PCI bridge window: [mem 0xec100000-0xec1fffff]
[ 5434.058626] pcmcia_socket0: cs: memory probe 0xec100000-0xec1fffff: excluding 0xec100000-0xec10ffff
[ 5434.058998] yenta_cardbus 0000:02:06.0: pcmcia: parent PCI bridge window: [mem 0x40000000-0x47ffffff pref]
[ 5434.059019] pcmcia_socket0: cs: memory probe 0x40000000-0x47ffffff: excluding 0x40000000-0x47ffffff
[ 5434.116776] pcmcia_socket0: cs: IO port probe 0x100-0x3af: excluding nothing: probe failed.
[ 5434.117187] pcmcia_socket0: cs: IO port probe 0x3e0-0x4ff: excluding nothing: probe failed.
[ 5434.117567] pcmcia_socket0: cs: IO port probe 0x820-0x8ff: excluding nothing: probe failed.
[ 5434.117846] pcmcia_socket0: cs: IO port probe 0xc00-0xcf7: excluding nothing: probe failed.
[ 5434.118131] pcmcia_socket0: cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xfffff
[ 5434.118516] pcmcia_socket0: cs: memory probe 0xa0000000-0xa0ffffff: excluding 0xa0000000-0xa0ffffff
[ 5434.118771] pcmcia_socket0: cs: memory probe 0x60000000-0x60ffffff: excluding 0x60000000-0x60ffffff
[ 5434.119106] pcmcia_socket0: cs: IO port probe 0xa00-0xaff: excluding nothing: probe failed.
---
drivers/pcmcia/rsrc_nonstatic.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index da494fe451ba..9af46e75b98c 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -188,7 +188,7 @@ static void do_io_probe(struct pcmcia_socket *s, unsigned int base,
int any;
u_char *b, hole, most;
- dev_info(&s->dev, "cs: IO port probe %#x-%#x:", base, base+num-1);
+ pr_info("%s: cs: IO port probe %#x-%#x:", dev_name(&s->dev), base, base+num-1);
/* First, what does a floating port look like? */
b = kzalloc(256, GFP_KERNEL);
@@ -410,8 +410,8 @@ static int do_mem_probe(struct pcmcia_socket *s, u_long base, u_long num,
struct socket_data *s_data = s->resource_data;
u_long i, j, bad, fail, step;
- dev_info(&s->dev, "cs: memory probe 0x%06lx-0x%06lx:",
- base, base+num-1);
+ pr_info("%s: cs: memory probe 0x%06lx-0x%06lx:",
+ dev_name(&s->dev), base, base+num-1);
bad = fail = 0;
step = (num < 0x20000) ? 0x2000 : ((num>>4) & ~0x1fff);
/* don't allow too large steps */
--
2.46.0
--
René Rebe, ExactCODE GmbH, Berlin, Germany
https://exactco.de • https://t2linux.com • https://patreon.com/renerebe
Powered by blists - more mailing lists