From: Frans Pop <elendil@planet.nl>
To: linux-kernel@vger.kernel.org
Cc: linux@dominikbrodowski.net, dbrownell@users.sourceforge.net,
linux-pcmcia@lists.infradead.org
Subject: [PATCH] pcmcia: ensure correct logging in do_io_probe [v2]
Date: Fri, 7 Nov 2008 15:22:42 +0100 [thread overview]
Message-ID: <200811071522.43618.elendil@planet.nl> (raw)
I've added parens around the conditions. Maybe not strictly needed,
but better readable and consistent with similar usage in cs.c.
Cheers,
FJP
---
From: Frans Pop <elendil@planet.nl>
pcmcia: ensure correct logging in do_io_probe
During early probing of the parent PCI bridge I/O window no socket
has been allocated yet.
In that case print &s->cb_dev->dev instead of &s->dev as device.
Also properly close previous dev_printk if kzalloc fails.
Signed-off-by: Frans Pop <elendil@planet.nl>
CC: Dominik Brodowski <linux@dominikbrodowski.net>
diff --git a/drivers/pcmcia/rsrc_nonstatic.c
b/drivers/pcmcia/rsrc_nonstatic.c
index 17f4ecf..2a6a3d1 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -200,14 +200,17 @@ static void do_io_probe(struct pcmcia_socket *s,
unsigned int base,
int any;
u_char *b, hole, most;
- dev_printk(KERN_INFO, &s->dev, "cs: IO port probe %#x-%#x:",
- base, base+num-1);
+ dev_printk(KERN_INFO,
+ (s->state & SOCKET_PRESENT) ? &s->dev : &s->cb_dev->dev,
+ "cs: IO port probe %#x-%#x:", base, base+num-1);
/* First, what does a floating port look like? */
b = kzalloc(256, GFP_KERNEL);
if (!b) {
- dev_printk(KERN_ERR, &s->dev,
- "do_io_probe: unable to kmalloc 256 bytes");
+ printk("\n");
+ dev_printk(KERN_ERR,
+ (s->state & SOCKET_PRESENT) ? &s->dev : &s->cb_dev->dev,
+ "cs: do_io_probe: unable to kmalloc 256 bytes");
return;
}
for (i = base, most = 0; i < base+num; i += 8) {
next reply other threads:[~2008-11-07 14:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-07 14:22 Frans Pop [this message]
2008-11-09 21:28 ` [PATCH] pcmcia: ensure correct logging in do_io_probe [v2] Dominik Brodowski
2008-11-15 15:24 ` Frans Pop
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=200811071522.43618.elendil@planet.nl \
--to=elendil@planet.nl \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.org \
--cc=linux@dominikbrodowski.net \
/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