lkml.org 
[lkml]   [2004]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix dev_printk to work even in the absence of am attached driver
On Mon, Apr 19, 2004 at 03:39:57PM -0500, James Bottomley wrote:
> /* 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 : "(unbound)", (dev)->bus_id , ## arg)

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 :)

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.047 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site