Skip to contentSkip to conversation

printk prefix cleanups.

PATCH Pete Zaitcev 3 participants 4 messages Feb 12, 2002 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Review

Quoted 8 lines

Here is a simple patch which reduces resultant binary size by 1.2k for this particular module (opl3sa2). [...]

#define OPL3SA2_MODULE_NAME "opl3sa2"

(quoted diff) +2 -1
+#define OPL3SA2_PFX		OPL3SA2_MODULE_NAME ": "
 
-			printk(KERN_ERR "opl3sa2: MSS mixer not installed?\n");
+			printk(KERN_ERR OPL3SA2_PFX "MSS mixer not installed?\n");

I do not believe that it shortens binaries. Care to quote size(1) output and /proc/modules with and without the patch?

-- Pete

#2 lore raw
Quoted 11 lines · Pete Zaitcev

Review

Quoted 8 lines

Here is a simple patch which reduces resultant binary size by 1.2k for this particular module (opl3sa2). [...]

#define OPL3SA2_MODULE_NAME "opl3sa2"

(quoted diff) +2 -1
+#define OPL3SA2_PFX		OPL3SA2_MODULE_NAME ": "
 
-			printk(KERN_ERR "opl3sa2: MSS mixer not installed?\n");
+			printk(KERN_ERR OPL3SA2_PFX "MSS mixer not installed?\n");

I do not believe that it shortens binaries. Care to quote size(1) output and /proc/modules with and without the patch?

It does _not_ reduce the memory footprint, that i knew before doing the patch, the only thing it does do is reduce the resultant binary's filesize. Surely thats worth it just for the space saving? size(1) reports the same sizes for both patched and unpatched.

Regards,
Zwane Mwaikambo

#3 lore raw
Quoted 12 lines · Zwane Mwaikambo
Quoted 9 lines · Pete Zaitcev
Quoted 8 lines

Here is a simple patch which reduces resultant binary size by 1.2k for this particular module (opl3sa2). [...]

#define OPL3SA2_MODULE_NAME "opl3sa2"

(quoted diff) +2 -1
+#define OPL3SA2_PFX                OPL3SA2_MODULE_NAME ": "
 
-                   printk(KERN_ERR "opl3sa2: MSS mixer not installed?\n");
+                   printk(KERN_ERR OPL3SA2_PFX "MSS mixer not installed?\n");
Quoted 7 lines
Quoted 2 lines

I do not believe that it shortens binaries. Care to quote size(1) output and /proc/modules with and without the patch?

It does _not_ reduce the memory footprint, that i knew before doing the patch, the only thing it does do is reduce the resultant binary's filesize. Surely thats worth it just for the space saving? size(1) reports the same sizes for both patched and unpatched.

If size(1) reports the same size, then no.

But I would still support a patch that added just 'PFX' to the driver...

Jeff

Signature · 3 lines
Jeff Garzik      | "I went through my candy like hot oatmeal
Building 1024    |  through an internally-buttered weasel."
MandrakeSoft     |             - goats.com
#4 lore raw
Quoted 3 lines · Jeff Garzik

If size(1) reports the same size, then no.

But I would still support a patch that added just 'PFX' to the driver...

Damn LKML is a tough sell! I'll submit something a bit later on to add PFX.

Cheers,
Zwane Mwaikambo