On Tue, Jun 27, 2006 at 09:25:26PM +0900, Tejun Heo wrote: Hi, > IMHO, this should be done in the following steps. > > * define ATA_MSG_* and ata_msg_* macros which map 1:1 to the current > message levels. How about we pin down these final dbg levels to the following (both proposals merged): ATA_MSG_ERR ATA_MSG_WARNING ATA_MSG_DRV ("standard" driver info, initial cfg messages) ATA_MSG_INFO maybe) /* revalidation messages, EH progress, more verbose msgs, feats */ ATA_MSG_VDEBUG /* verbose hot path */, by the way, which are those hotpaths? ATA_MSG_CMD /* issue / completion */ ATA_MSG_SG /* SG map/unmap handling */ ATA_MGS_TRACE /* function enter/exit */ > * make ata_*_prink()s use ATA_MSG_* instead of KERN_* and embed > ata_msg_enable() into ata_*_printk()s. Convert ALL ata_*_printk()s and > convertible DEBUG/VDEBUG()s in single sweep - it doesn't have to be a > single patch but post them together. These conversions touch a lot of > places and other patches have to be regenerated afterward. then do something like #define ata_(ap|dev)_printk((ap|dev), lv, fmt, args...) \ if (ata_msg_err(ap)) \ printk(KERN_ERR"ata%u: "fmt, ...); \ else if (ata_msg_warn(ap)) \ printk(KERN_WARNING"ata%u: "fmt, ...); \ . . . and then call them like so: ata_dev_printk(dev, ATA_MSG_ERR, "Error!%d", i); and so on. This looks pretty compact to me, no? Regards, Boris. ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de - : send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html