Tejun Heo wrote:
Borislav Petkov wrote:
On Fri, Jun 30, 2006 at 03:09:16AM +0900, Tejun Heo wrote:
Please make
+ ATA_MSG_ERR = 0,
+ ATA_MSG_WARN = 1,
+ ATA_MSG_DRV = 2,
+ ATA_MSG_INFO = 3, /* revalidation messages, EH progress */
+ ATA_MSG_VDEBUG = 4, /* verbose hot path */
+ ATA_MSG_CMD = 5, /* issue / completion */
+ ATA_MSG_SG = 6, /* SG map/unmap handling */
+ ATA_MSG_TRACE = 7, /* function tracing, e.g. enter/exit */
And test for msg_enable & (1 << (lv)). Otherwise the array will be
unnecessarily large.
Yeah, but this won't work:
imagine default level is:
msg_enable = ATA_MSG_INFO;
You can do "msg_enable |= (1 << ATA_MSG_INFO)" or keep ATA_MSG_*'s as
bit masks and use fls() to index into level array. Just make sure that
the level array isn't 512 entries long.
Oh, one more thing, in libata, when specifying bit mask, we use
ATA_MSG_WARN = (1 << 1), instead of ATA_MSG_ERR = 0x02. Just a style
thing. :-)
--
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