On Tue, Jun 27, 2006 at 10:33:38PM +0900, Tejun Heo wrote: > 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); Oops, forget it, the coffee hasn't entered my brain yet so things like that might happen, __ata_msg_lvs[lv] is a char array, so the second one _is_ correct. Regards, Boris. ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.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