On Thu, Jun 01, 2006 at 03:09:31PM +0900, Tejun Heo wrote: > Those ATA_MSG_* constants designates two things.. > > * message level (debug, info, warning...) > * message origin (probe, intr...) > > although above distinction isn't clear for some constants. libata now > uses ata_port/dev_printk() macros to print messages and the second > argument is message level (KERN_INFO, KERN_WARNING...), which carries > duplicate information as above ATA_* constants. IMHO, it would be > better to fold the two into one. e.g. > > ata_port_printk(ap, ATA_MSG_INFO, "blah blah\n"); > > instead of > > if (ata_msg_info(ap)) > ata_port_printk(ap, KERN_INFO, "blah blah\n"); > > Some constants probably need to be adjusted a bit though. Although I agree, it is best to integrate the msg_enable support in "waves", not doing too much at once, so that we have time to reflect better on the next step -- just like what we're doing now. The ata_msg_xxx level and KERN_xxx level are not perfectly mapped, nor should they be, so the proposed scheme may not work out once we have all the message levels integrated. The most important goal to achieve is (a) eliminating the need for users to rebuild libata to get verbose messages and (b) allowing fine-grained per-port verbose debugging and tracing. We can address cleanups after those goals. Jeff - : 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