From: James Bottomley <James.Bottomley@steeleye.com>
To: Greg KH <greg@kroah.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fix dev_printk to work even in the absence of am attached driver
Date: 11 May 2004 09:00:47 -0500 [thread overview]
Message-ID: <1084284048.2305.6.camel@mulgrave> (raw)
In-Reply-To: <20040422220756.GA2479@kroah.com>
On Thu, 2004-04-22 at 17:07, Greg KH wrote:
> But doesn't this cause the string "(unbound)" to be created for every
> dev_printk() call in the code? I don't think gcc can optimize that very
> well. How about making a global string just for that, otherwise the
> size police will come after me for adding such a patch :)
OK, I can't find an elegant way of making it global, so I think the best
thing to do is just leave it blank for no driver (gcc can optimise that
case).
James
===== include/linux/device.h 1.117 vs edited =====
--- 1.117/include/linux/device.h Mon Apr 12 12:54:25 2004
+++ edited/include/linux/device.h Tue May 11 08:58:44 2004
@@ -400,7 +400,7 @@
/* debugging and troubleshooting/diagnostic helpers. */
#define dev_printk(level, dev, format, arg...) \
- printk(level "%s %s: " format , (dev)->driver->name , (dev)->bus_id , ## arg)
+ printk(level "%s %s: " format , (dev)->driver ? (dev)->driver->name : "" , (dev)->bus_id , ## arg)
#ifdef DEBUG
#define dev_dbg(dev, format, arg...) \
next prev parent reply other threads:[~2004-05-11 14:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-19 20:39 [PATCH] fix dev_printk to work even in the absence of am attached driver James Bottomley
2004-04-22 22:07 ` Greg KH
2004-05-11 14:00 ` James Bottomley [this message]
2004-05-11 23:39 ` Greg KH
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=1084284048.2305.6.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/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 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.