Tejun Heo wrote:
Actually, how about... enum { ATA_MSG_ERR, ATA_MSG_WARNING, ... }; const char *__ata_msg_lvs[] = { [ATA_MSG_ERR] = KERN_ERR, [ATA_MSG_WARNING] = KERN_WARNING, ... }; #define ata_port_printk(ap, lv, fmt, args...) do { \ if (unlikely((ap)->msg_enable & (1 << (lv)))) printk(__ata_msg_lvs[lv]"ata%u: "fmt, (ap)->id , #args);
Oops, printk("%sata%u: "fmt, __ata_msg_lvs[lv], (ap)->id, #args); -- tejun - : 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